forked from firka/flutter
Remove DOMImplementation.
Expose a Document constructor instead. This also exposes that the TemplateBinding library might need more control over the registration context for custom elements. For now we make all documents share the same registration context. R=ojan@chromium.org, abarth@chromium.org Review URL: https://codereview.chromium.org/697363002
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
Running 1 tests
|
||||
ok 1 Document should have a constructor
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@@ -2,10 +2,10 @@
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<script>
|
||||
describe('DOMImplementation', function() {
|
||||
it('should let you create a document', function() {
|
||||
var doc = document.implementation.createDocument();
|
||||
assert.isNotNull(doc, 'createDocument should return a value');
|
||||
describe('Document', function() {
|
||||
it('should have a constructor', function() {
|
||||
var doc = new Document();
|
||||
assert.isNotNull(doc);
|
||||
assert.doesNotThrow(function() {
|
||||
doc.registerElement('x-foo');
|
||||
}, 'new document should have a registration context');
|
||||
@@ -104,7 +104,7 @@ describe('createElementNS tests from mozilla, attached to webkit bug 16833', fun
|
||||
}
|
||||
}
|
||||
|
||||
var doc = document.implementation.createDocument();
|
||||
var doc = new Document();
|
||||
runNSTests(allNoNSTests, doc, "createElement");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 DOMImplementation should let you create a document
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@@ -11,7 +11,7 @@ describe('MutationObserver cross document moves', function() {
|
||||
});
|
||||
|
||||
observer.observe(div, {attributes: true});
|
||||
var newDoc = document.implementation.createDocument('', '', null);
|
||||
var newDoc = new Document();
|
||||
newDoc.appendChild(div);
|
||||
div.id = 'foo';
|
||||
setTimeout(function() {
|
||||
@@ -32,7 +32,7 @@ describe('MutationObserver cross document moves', function() {
|
||||
});
|
||||
|
||||
observer.observe(div, {attributes: true, subtree: true});
|
||||
var newDoc = document.implementation.createDocument();
|
||||
var newDoc = new Document();
|
||||
newDoc.appendChild(div);
|
||||
subDiv.id = 'foo';
|
||||
setTimeout(function() {
|
||||
|
||||
Reference in New Issue
Block a user