OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart._js_helper; | 5 part of dart._js_helper; |
6 | 6 |
7 | 7 |
8 /** | 8 /** |
9 * Sets a JavaScript property on an object. | 9 * Sets a JavaScript property on an object. |
10 */ | 10 */ |
11 void defineProperty(var obj, String property, var value) { | 11 void defineProperty(var obj, String property, var value) { |
12 JS('void', | 12 JS('void', |
13 'Object.defineProperty(#, #, ' | 13 'Object.defineProperty(#, #, ' |
14 '{value: #, enumerable: false, writable: true, configurable: true})', | 14 '{value: #, enumerable: false, writable: true, configurable: true})', |
15 obj, | 15 obj, |
16 property, | 16 property, |
17 value); | 17 value); |
18 } | 18 } |
19 | |
20 // Obsolete in dart dev compiler. Added only so that the same version of | |
21 // dart:html can be used in dart2js an dev compiler. | |
22 setNativeSubclassDispatchRecord(proto, interceptor) { } | |
23 convertDartClosureToJS(closure, int arity) {} | |
vsm
2016/04/20 23:11:00
This should return closure, right?
Jacob
2016/04/21 01:02:39
Done. Also made this a generic method.
| |
24 findDispatchTagForInterceptorClass(interceptorClassConstructor) {} | |
25 makeLeafDispatchRecord(interceptor) {} | |
OLD | NEW |