OLD | NEW |
1 part of html_common; | 1 part of html_common; |
2 | 2 |
3 convertDartToNative_PrepareForStructuredClone(value) => | 3 convertDartToNative_PrepareForStructuredClone(value) => |
4 new _StructuredCloneDartium().convertDartToNative_PrepareForStructuredClone(
value); | 4 new _StructuredCloneDartium().convertDartToNative_PrepareForStructuredClone(
value); |
5 | 5 |
6 convertNativeToDart_AcceptStructuredClone(object, {mustCopy: false}) => | 6 convertNativeToDart_AcceptStructuredClone(object, {mustCopy: false}) => |
7 new _AcceptStructuredCloneDartium().convertNativeToDart_AcceptStructuredClon
e(object, mustCopy: mustCopy); | 7 new _AcceptStructuredCloneDartium().convertNativeToDart_AcceptStructuredClon
e(object, mustCopy: mustCopy); |
8 | 8 |
9 class _StructuredCloneDartium extends _StructuredClone { | 9 class _StructuredCloneDartium extends _StructuredClone { |
10 newJsMap() => new js.JsObject(js.context["Object"]); | 10 newJsMap() => new js.JsObject(js.context["Object"]); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 }); | 96 }); |
97 return jsObject; | 97 return jsObject; |
98 } | 98 } |
99 | 99 |
100 // Creates a Dart class to allow members of the Map to be fetched (as if getters
exist). | 100 // Creates a Dart class to allow members of the Map to be fetched (as if getters
exist). |
101 // TODO(terry): Need to use package:js but that's a problem in dart:html. Talk t
o | 101 // TODO(terry): Need to use package:js but that's a problem in dart:html. Talk t
o |
102 // Jacob about how to do this properly using dart:js. | 102 // Jacob about how to do this properly using dart:js. |
103 class _ReturnedDictionary { | 103 class _ReturnedDictionary { |
104 Map _values; | 104 Map _values; |
105 | 105 |
106 noSuchMethod(InvocationMirror invocation) { | 106 noSuchMethod(Invocation invocation) { |
107 var key = MirrorSystem.getName(invocation.memberName); | 107 var key = MirrorSystem.getName(invocation.memberName); |
108 if (invocation.isGetter) { | 108 if (invocation.isGetter) { |
109 return _values[key]; | 109 return _values[key]; |
110 } else if (invocation.isSetter && key.endsWith('=')) { | 110 } else if (invocation.isSetter && key.endsWith('=')) { |
111 key = key.substring(0, key.length-1); | 111 key = key.substring(0, key.length-1); |
112 _values[key] = invocation.positionalArguments[0]; | 112 _values[key] = invocation.positionalArguments[0]; |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 Map get toMap => _values; | 116 Map get toMap => _values; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 {'type': dartClass, 'extends': extendTag != null ? extendTag : "" }; | 402 {'type': dartClass, 'extends': extendTag != null ? extendTag : "" }; |
403 } | 403 } |
404 | 404 |
405 Type getCustomElementType(object) { | 405 Type getCustomElementType(object) { |
406 var entry = getCustomElementEntry(object); | 406 var entry = getCustomElementEntry(object); |
407 if (entry != null) { | 407 if (entry != null) { |
408 return entry['type']; | 408 return entry['type']; |
409 } | 409 } |
410 return null; | 410 return null; |
411 } | 411 } |
OLD | NEW |