7add882a7a
Prepare for writing all the runtime in Dart: - Move js runtime files to lib/runtime/dart (dart_runtime.js -> dart/_runtime.js), - Use rest params instead of arguments slicing in a couple of places. BUG=https://github.com/dart-lang/dev_compiler/issues/310 R=jmesserly@google.com Review URL: https://codereview.chromium.org/1413683006 .
21 lines
634 B
JavaScript
21 lines
634 B
JavaScript
dart_library.library('domtest', null, /* Imports */[
|
|
"dart/_runtime",
|
|
'sunflower/dom',
|
|
'dart/core'
|
|
], /* Lazy imports */[
|
|
], function(exports, dart, dom, core) {
|
|
'use strict';
|
|
let dartx = dart.dartx;
|
|
function testNativeIndexers() {
|
|
let nodes = dom.document.querySelector('body').childNodes;
|
|
for (let i = 0; dart.notNull(i) < dart.notNull(nodes.length); i = dart.notNull(i) + 1) {
|
|
let old = nodes[i];
|
|
nodes[i] = dom.document.createElement('div');
|
|
core.print(dart.equals(nodes[i], old));
|
|
}
|
|
}
|
|
dart.fn(testNativeIndexers);
|
|
// Exports:
|
|
exports.testNativeIndexers = testNativeIndexers;
|
|
});
|