OLD | NEW |
1 dart_library.library('domtest', null, /* Imports */[ | 1 dart_library.library('domtest', null, /* Imports */[ |
2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
3 'sunflower/dom', | 3 'sunflower/dom', |
4 'dart/core' | 4 'dart/core' |
5 ], /* Lazy imports */[ | 5 ], /* Lazy imports */[ |
6 ], function(exports, dart, dom, core) { | 6 ], function(exports, dart, dom, core) { |
7 'use strict'; | 7 'use strict'; |
8 let dartx = dart.dartx; | 8 let dartx = dart.dartx; |
9 function testNativeIndexers() { | 9 function testNativeIndexers() { |
10 let nodes = dom.document.querySelector('body').childNodes; | 10 let nodes = dart.dcall(dom.document.querySelector, 'body').childNodes; |
11 for (let i = 0; dart.notNull(i) < dart.notNull(nodes.length); i = dart.notNu
ll(i) + 1) { | 11 for (let i = 0; dart.notNull(i) < dart.notNull(nodes.length); i = dart.notNu
ll(i) + 1) { |
12 let old = nodes[i]; | 12 let old = nodes[i]; |
13 nodes[i] = dom.document.createElement('div'); | 13 nodes[i] = dart.dcall(dom.document.createElement, 'div'); |
14 core.print(dart.equals(nodes[i], old)); | 14 dart.dcall(core.print, dart.equals(nodes[i], old)); |
15 } | 15 } |
16 } | 16 } |
17 dart.fn(testNativeIndexers); | 17 dart.fn(testNativeIndexers); |
18 // Exports: | 18 // Exports: |
19 exports.testNativeIndexers = testNativeIndexers; | 19 exports.testNativeIndexers = testNativeIndexers; |
20 }); | 20 }); |
OLD | NEW |