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:
Elliott Sprehn
2014-11-03 23:18:39 -08:00
parent 79ea19ffc7
commit d1382e4d41
5 changed files with 12 additions and 12 deletions

View File

@@ -0,0 +1,5 @@
Running 1 tests
ok 1 Document should have a constructor
1 tests
1 pass
0 fail

View File

@@ -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');

View File

@@ -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");
});
});

View File

@@ -1,5 +0,0 @@
Running 1 tests
ok 1 DOMImplementation should let you create a document
1 tests
1 pass
0 fail

View File

@@ -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() {