Only allow one shadowRoot.
R=ojan@chromium.org Review URL: https://codereview.chromium.org/759663003
This commit is contained in:
parent
a0c48f7369
commit
b6303c5d69
@ -14,7 +14,7 @@ WidgetPrototype.createdCallback = function() {
|
||||
this.wasAttached = false;
|
||||
this.wasDetached = false;
|
||||
this.attrsChanged = [];
|
||||
this.createShadowRoot();
|
||||
this.ensureShadowRoot();
|
||||
};
|
||||
|
||||
WidgetPrototype.attachedCallback = function() {
|
||||
|
@ -53,7 +53,7 @@ describe("appendChild", function() {
|
||||
it("should throw when inserting a tree scope", function() {
|
||||
var parent = document.createElement("div");
|
||||
var doc = new Document();
|
||||
var shadowRoot = document.createElement("span").createShadowRoot();
|
||||
var shadowRoot = document.createElement("span").ensureShadowRoot();
|
||||
assert.throws(function() {
|
||||
parent.appendChild(doc);
|
||||
});
|
||||
|
@ -67,7 +67,7 @@ describe("replaceChild", function() {
|
||||
it("should throw when inserting a tree scope", function() {
|
||||
var parent = document.createElement("div");
|
||||
var doc = new Document();
|
||||
var shadowRoot = document.createElement("span").createShadowRoot();
|
||||
var shadowRoot = document.createElement("span").ensureShadowRoot();
|
||||
assert.throws(function() {
|
||||
parent.replaceChild(doc);
|
||||
});
|
||||
|
@ -13,7 +13,7 @@ describe('MutationObservers', function() {
|
||||
}
|
||||
|
||||
var range = document.getElementById('range');
|
||||
var shadowRoot = range.createShadowRoot();
|
||||
var shadowRoot = range.ensureShadowRoot();
|
||||
shadowRoot.appendChild(document.createElement('div'));
|
||||
var observer = new MutationObserver(function() { });
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user