зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws.
This commit is contained in:
Родитель
77bac28360
Коммит
bdc1ffa608
|
@ -117,8 +117,7 @@ function* testContainer1(browser, accDoc) {
|
|||
/* ================ Remove element ======================================== */
|
||||
onReorder = waitForEvent(EVENT_REORDER, id);
|
||||
yield ContentTask.spawn(browser, {}, () =>
|
||||
content.document.getElementById('t1_span').parentNode.removeChild(
|
||||
content.document.getElementById('t1_span')));
|
||||
content.document.getElementById('t1_span').remove());
|
||||
yield onReorder;
|
||||
|
||||
// subdiv should go away
|
||||
|
|
|
@ -119,7 +119,7 @@ function* testContainer(browser) {
|
|||
onReorder = waitForEvent(EVENT_REORDER, id);
|
||||
yield ContentTask.spawn(browser, {}, () => {
|
||||
let mapNode = content.document.getElementById('map');
|
||||
mapNode.parentNode.removeChild(mapNode);
|
||||
mapNode.remove();
|
||||
});
|
||||
yield onReorder;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
this.invoke = function removeElm_invoke()
|
||||
{
|
||||
this.node.parentNode.removeChild(this.node);
|
||||
this.node.remove();
|
||||
}
|
||||
|
||||
this.check = function removeElm_check()
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
testGroupAttrs("tree4_ti2", 2, 2, 1);
|
||||
var tree4element = document.getElementById("tree4_ti1");
|
||||
var tree4acc = getAccessible("tree4");
|
||||
tree4element.parentNode.removeChild(tree4element);
|
||||
tree4element.remove();
|
||||
waitForEvent(EVENT_REORDER, tree4acc, function() {
|
||||
testGroupAttrs("tree4_ti2", 1, 1, 1);
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
{
|
||||
switch (aAction) {
|
||||
case kRemoveElm:
|
||||
aNode.parentNode.removeChild(aNode);
|
||||
aNode.remove();
|
||||
break;
|
||||
|
||||
case kHideElm:
|
||||
|
@ -328,8 +328,8 @@
|
|||
|
||||
this.invoke = function removeGrandChildrenNHideParent_invoke()
|
||||
{
|
||||
this.child1.parentNode.removeChild(this.child1);
|
||||
this.child2.parentNode.removeChild(this.child2);
|
||||
this.child1.remove();
|
||||
this.child2.remove();
|
||||
this.parent.hidden = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
|
||||
this.invoke = function removeFromDOM_invoke()
|
||||
{
|
||||
this.DOMNode.parentNode.removeChild(this.DOMNode);
|
||||
this.DOMNode.remove();
|
||||
}
|
||||
|
||||
this.getID = function removeFromDOM_getID()
|
||||
|
@ -387,12 +387,12 @@
|
|||
this.invoke = function hideNDestroyDoc_invoke()
|
||||
{
|
||||
this.txt = getAccessible('c5').firstChild.firstChild;
|
||||
this.txt.DOMNode.parentNode.removeChild(this.txt.DOMNode);
|
||||
this.txt.DOMNode.remove();
|
||||
}
|
||||
|
||||
this.check = function hideNDestroyDoc_check()
|
||||
{
|
||||
getNode('c5').parentNode.removeChild(getNode('c5'));
|
||||
getNode('c5').remove();
|
||||
}
|
||||
|
||||
this.getID = function hideNDestroyDoc_getID()
|
||||
|
@ -420,7 +420,7 @@
|
|||
|
||||
this.check = function hideHideNDestroyDoc_check()
|
||||
{
|
||||
getNode('c6').parentNode.removeChild(getNode('c6'));
|
||||
getNode('c6').remove();
|
||||
}
|
||||
|
||||
this.getID = function hideHideNDestroyDoc_getID()
|
||||
|
|
|
@ -476,7 +476,7 @@ function removeVCPositionInvoker(aDocAcc, aPosNode)
|
|||
this.invoke = function removeVCPositionInvoker_invoke()
|
||||
{
|
||||
aDocAcc.virtualCursor.position = this.accessible;
|
||||
aPosNode.parentNode.removeChild(aPosNode);
|
||||
aPosNode.remove();
|
||||
};
|
||||
|
||||
this.getID = function removeVCPositionInvoker_getID()
|
||||
|
@ -523,7 +523,7 @@ function removeVCRootInvoker(aRootNode)
|
|||
this.invoke = function removeVCRootInvoker_invoke()
|
||||
{
|
||||
this.pivot.position = this.pivot.root.firstChild;
|
||||
aRootNode.parentNode.removeChild(aRootNode);
|
||||
aRootNode.remove();
|
||||
};
|
||||
|
||||
this.getID = function removeVCRootInvoker_getID()
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
this.invoke = function removeEl_invoke()
|
||||
{
|
||||
// remove a container of t1_subdiv
|
||||
getNode("t1_span").parentNode.removeChild(getNode("t1_span"));
|
||||
getNode("t1_span").remove();
|
||||
}
|
||||
|
||||
this.finalCheck = function removeEl_finalCheck()
|
||||
|
@ -523,7 +523,7 @@
|
|||
{
|
||||
getNode(aChild).setAttribute("aria-owns", "no_id");
|
||||
getNode(aParent).removeChild(getNode(aChild));
|
||||
getNode(aParent).parentNode.removeChild(getNode(aParent));
|
||||
getNode(aParent).remove();
|
||||
}
|
||||
|
||||
this.getID = function setARIAOwnsOnElToRemove_getID()
|
||||
|
|
|
@ -273,7 +273,7 @@
|
|||
this.invoke = function removeMap_invoke()
|
||||
{
|
||||
this.imageMap = getAccessible(aImageMapID);
|
||||
this.mapNode.parentNode.removeChild(this.mapNode);
|
||||
this.mapNode.remove();
|
||||
}
|
||||
|
||||
this.finalCheck = function removeMap_finalCheck()
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
{
|
||||
this.lastItem = getAccessible(aID).lastChild;
|
||||
this.lastCell = this.lastItem.lastChild;
|
||||
getNode(aID).parentNode.removeChild(getNode(aID));
|
||||
getNode(aID).remove();
|
||||
};
|
||||
|
||||
this.check = function check(aEvent)
|
||||
|
|
|
@ -61,5 +61,5 @@ exports.window = window;
|
|||
// Still close window on unload to claim memory back early.
|
||||
unload(function() {
|
||||
window.close()
|
||||
frame.parentNode.removeChild(frame);
|
||||
frame.remove();
|
||||
});
|
||||
|
|
|
@ -966,14 +966,14 @@ var MenuWrapper = Class({
|
|||
if (toplevel.length == 0) {
|
||||
let separator = this.separator;
|
||||
if (separator)
|
||||
separator.parentNode.removeChild(separator);
|
||||
separator.remove();
|
||||
}
|
||||
}
|
||||
else if (parent == this.overflowPopup) {
|
||||
// If there are no more items then remove the overflow menu and separator
|
||||
if (parent.childNodes.length == 0) {
|
||||
let separator = this.separator;
|
||||
separator.parentNode.removeChild(separator);
|
||||
separator.remove();
|
||||
this.contextMenu.removeChild(parent.parentNode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ function removeHiddenFrame(frame) {
|
|||
cache.delete(frame);
|
||||
emit(frame, "unload")
|
||||
let element = frame.element
|
||||
if (element) element.parentNode.removeChild(element)
|
||||
if (element) element.remove()
|
||||
}
|
||||
exports.remove = removeHiddenFrame;
|
||||
|
||||
|
|
|
@ -367,7 +367,7 @@ function attach(panel, document) {
|
|||
exports.attach = attach;
|
||||
|
||||
function detach(panel) {
|
||||
if (panel.parentNode) panel.parentNode.removeChild(panel);
|
||||
if (panel.parentNode) panel.remove();
|
||||
}
|
||||
exports.detach = detach;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ function create(window, details) {
|
|||
exports.create = create;
|
||||
|
||||
function dispose(menuitem) {
|
||||
menuitem.parentNode.removeChild(menuitem);
|
||||
menuitem.remove();
|
||||
}
|
||||
exports.dispose = dispose;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ function createProxyTest(html, callback) {
|
|||
if (isDone)
|
||||
return;
|
||||
isDone = true;
|
||||
element.parentNode.removeChild(element);
|
||||
element.remove();
|
||||
done();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -51,7 +51,7 @@ exports.testMembranelessMode = function(assert, done) {
|
|||
|
||||
worker.port.on("done", () => {
|
||||
// cleanup
|
||||
element.parentNode.removeChild(element);
|
||||
element.remove();
|
||||
worker.destroy();
|
||||
loader.unload();
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ function createProxyTest(html, callback) {
|
|||
if (isDone)
|
||||
return;
|
||||
isDone = true;
|
||||
element.parentNode.removeChild(element);
|
||||
element.remove();
|
||||
done();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1059,7 +1059,7 @@ exports.testAttachToTabsOnly = function(assert, done) {
|
|||
iframe.setAttribute('type', 'content');
|
||||
iframe.setAttribute('src', 'data:text/html;charset=utf-8,foobar');
|
||||
iframe.addEventListener('DOMContentLoaded', function() {
|
||||
iframe.parentNode.removeChild(iframe);
|
||||
iframe.remove();
|
||||
openTabWithIframes();
|
||||
}, {once: true});
|
||||
document.documentElement.appendChild(iframe);
|
||||
|
|
|
@ -104,7 +104,7 @@ this.SafeMode = {
|
|||
break;
|
||||
case "mozContentEvent":
|
||||
content.removeEventListener("mozContentEvent", handleEvent, true);
|
||||
contentBrowser.parentNode.removeChild(contentBrowser);
|
||||
contentBrowser.remove();
|
||||
|
||||
if (e.detail == "safemode-yes") {
|
||||
// Really starting in safe mode, let's disable add-ons first.
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
|
||||
// remove undisplayed errors to avoid bug 39098
|
||||
var errContainer = document.getElementById("errorContainer");
|
||||
errContainer.parentNode.removeChild(errContainer);
|
||||
errContainer.remove();
|
||||
|
||||
var className = getCSSClass();
|
||||
if (className && className != "expertBadCert") {
|
||||
|
|
|
@ -97,29 +97,29 @@
|
|||
|
||||
if (error !== "malware") {
|
||||
el = document.getElementById("errorTitleText_malware");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
el = document.getElementById("errorShortDescText_malware");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
el = document.getElementById("errorLongDescText_malware");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
}
|
||||
|
||||
if (error !== "phishing") {
|
||||
el = document.getElementById("errorTitleText_phishing");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
el = document.getElementById("errorShortDescText_phishing");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
el = document.getElementById("errorLongDescText_phishing");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
}
|
||||
|
||||
if (error !== "unwanted") {
|
||||
el = document.getElementById("errorTitleText_unwanted");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
el = document.getElementById("errorShortDescText_unwanted");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
el = document.getElementById("errorLongDescText_unwanted");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
}
|
||||
|
||||
// Set sitename
|
||||
|
@ -130,7 +130,7 @@
|
|||
if (!getOverride()) {
|
||||
var btn = document.getElementById("ignoreWarningButton");
|
||||
if (btn) {
|
||||
btn.parentNode.removeChild(btn);
|
||||
btn.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -918,7 +918,7 @@ var gHistorySwipeAnimation = {
|
|||
this._prevBox = null;
|
||||
this._nextBox = null;
|
||||
if (this._container)
|
||||
this._container.parentNode.removeChild(this._container);
|
||||
this._container.remove();
|
||||
this._container = null;
|
||||
this._boxWidth = -1;
|
||||
this._boxHeight = -1;
|
||||
|
|
|
@ -658,7 +658,7 @@ var gPopupBlockerObserver = {
|
|||
let item = aEvent.target.lastChild;
|
||||
while (item && item.getAttribute("observes") != "blockedPopupsSeparator") {
|
||||
let next = item.previousSibling;
|
||||
item.parentNode.removeChild(item);
|
||||
item.remove();
|
||||
item = next;
|
||||
}
|
||||
},
|
||||
|
@ -2542,7 +2542,7 @@ function UpdateUrlbarSearchSplitterState() {
|
|||
}
|
||||
urlbar.parentNode.insertBefore(splitter, ibefore);
|
||||
} else if (splitter)
|
||||
splitter.parentNode.removeChild(splitter);
|
||||
splitter.remove();
|
||||
}
|
||||
|
||||
function UpdatePageProxyState() {
|
||||
|
|
|
@ -336,7 +336,7 @@ Site.prototype = {
|
|||
let button = this._querySelector(buttonClass);
|
||||
if (button.hasAttribute("active")) {
|
||||
let explain = this._querySelector(explanationTextClass);
|
||||
explain.parentNode.removeChild(explain);
|
||||
explain.remove();
|
||||
|
||||
button.removeAttribute("active");
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ var gUpdater = {
|
|||
let node = aSite.node;
|
||||
|
||||
// Remove the site from the DOM.
|
||||
node.parentNode.removeChild(node);
|
||||
node.remove();
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -2765,7 +2765,7 @@
|
|||
// This will unload the document. An unload handler could remove
|
||||
// dependant tabs, so it's important that the tabbrowser is now in
|
||||
// a consistent state (tab removed, tab positions updated, etc.).
|
||||
browser.parentNode.removeChild(browser);
|
||||
browser.remove();
|
||||
|
||||
// Release the browser in case something is erroneously holding a
|
||||
// reference to the tab after its removal.
|
||||
|
|
|
@ -45,7 +45,7 @@ add_task(function *() {
|
|||
focusedId = yield performAccessKeyForChrome("z");
|
||||
is(focusedId, "chromebutton", "chromebutton accesskey");
|
||||
|
||||
newButton.parentNode.removeChild(newButton);
|
||||
newButton.remove();
|
||||
|
||||
gBrowser.removeTab(tab1);
|
||||
gBrowser.removeTab(tab2);
|
||||
|
|
|
@ -34,9 +34,9 @@ add_task(function* () {
|
|||
let pluginRemovedPromise = waitForEvent(gBrowser.selectedBrowser, "PluginRemoved", null, true, true);
|
||||
yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
|
||||
let plugin = content.document.getElementById("secondtestA");
|
||||
plugin.parentNode.removeChild(plugin);
|
||||
plugin.remove();
|
||||
plugin = content.document.getElementById("secondtestB");
|
||||
plugin.parentNode.removeChild(plugin);
|
||||
plugin.remove();
|
||||
|
||||
let image = content.document.createElement("object");
|
||||
image.type = "image/png";
|
||||
|
@ -50,7 +50,7 @@ add_task(function* () {
|
|||
|
||||
yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
|
||||
let plugin = content.document.getElementById("test");
|
||||
plugin.parentNode.removeChild(plugin);
|
||||
plugin.remove();
|
||||
});
|
||||
|
||||
popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser);
|
||||
|
|
|
@ -166,7 +166,7 @@ var tests = [
|
|||
},
|
||||
onHidden(popup) {
|
||||
this.notification.remove();
|
||||
this.box.parentNode.removeChild(this.box);
|
||||
this.box.remove();
|
||||
}
|
||||
},
|
||||
// Test that popupnotifications without popups have anchor icons shown
|
||||
|
|
|
@ -286,7 +286,7 @@ PlacesViewBase.prototype = {
|
|||
if (document.popupNode == aChild)
|
||||
document.popupNode = null;
|
||||
|
||||
aChild.parentNode.removeChild(aChild);
|
||||
aChild.remove();
|
||||
},
|
||||
|
||||
_setEmptyPopupStatus:
|
||||
|
|
|
@ -52,7 +52,7 @@ function checkState(tab) {
|
|||
let doc = contentWindow.document;
|
||||
let newElem = doc.getElementById("new-elem");
|
||||
ok(newElem, "doc should contain new-elem.");
|
||||
newElem.parentNode.removeChild(newElem);
|
||||
newElem.remove();
|
||||
ok(!doc.getElementById("new-elem"), "new-elem should be removed.");
|
||||
|
||||
tab.linkedBrowser.removeEventListener("popstate", arguments.callee, true);
|
||||
|
|
|
@ -1620,7 +1620,7 @@
|
|||
clear: function fontLoaderClear() {
|
||||
var styleElement = this.styleElement;
|
||||
if (styleElement) {
|
||||
styleElement.parentNode.removeChild(styleElement);
|
||||
styleElement.remove();
|
||||
styleElement = this.styleElement = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ var pdfjsWebLibs;
|
|||
this.document.removeEventListener('mousemove', this._onmousemove, true);
|
||||
this.document.removeEventListener('mouseup', this._endPan, true);
|
||||
if (this.overlay.parentNode) {
|
||||
this.overlay.parentNode.removeChild(this.overlay);
|
||||
this.overlay.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -620,7 +620,7 @@ var pktUIMessaging = (function() {
|
|||
callback(panelId, data, nodePrincipal);
|
||||
|
||||
// Cleanup the element
|
||||
e.target.parentNode.removeChild(e.target);
|
||||
e.target.remove();
|
||||
|
||||
}, false, true);
|
||||
}
|
||||
|
|
|
@ -65673,7 +65673,7 @@ var Debugger =
|
|||
if (cls) { cls += " CodeMirror-linebackground" }
|
||||
if (lineView.background) {
|
||||
if (cls) { lineView.background.className = cls }
|
||||
else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null }
|
||||
else { lineView.background.remove(); lineView.background = null }
|
||||
} else if (cls) {
|
||||
var wrap = ensureLineWrapped(lineView)
|
||||
lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild)
|
||||
|
@ -67689,7 +67689,7 @@ var Debugger =
|
|||
if (webkit && mac && cm.display.currentWheelTarget == node)
|
||||
{ node.style.display = "none" }
|
||||
else
|
||||
{ node.parentNode.removeChild(node) }
|
||||
{ node.remove() }
|
||||
return next
|
||||
}
|
||||
|
||||
|
@ -69761,7 +69761,7 @@ var Debugger =
|
|||
img._top = img.offsetTop
|
||||
}
|
||||
e.dataTransfer.setDragImage(img, 0, 0)
|
||||
if (presto) { img.parentNode.removeChild(img) }
|
||||
if (presto) { img.remove() }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2078,14 +2078,14 @@ Toolbox.prototype = {
|
|||
this._combineAndSortPanelDefinitions();
|
||||
|
||||
if (panel) {
|
||||
panel.parentNode.removeChild(panel);
|
||||
panel.remove();
|
||||
}
|
||||
|
||||
if (this.hostType == Toolbox.HostType.WINDOW) {
|
||||
let doc = this.win.parent.document;
|
||||
let key = doc.getElementById("key_" + toolId);
|
||||
if (key) {
|
||||
key.parentNode.removeChild(key);
|
||||
key.remove();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1406,7 +1406,7 @@ Inspector.prototype = {
|
|||
}
|
||||
|
||||
if (this._markupFrame) {
|
||||
this._markupFrame.parentNode.removeChild(this._markupFrame);
|
||||
this._markupFrame.remove();
|
||||
this._markupFrame = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -703,7 +703,7 @@ CssRuleView.prototype = {
|
|||
this.styleWindow = null;
|
||||
|
||||
if (this.element.parentNode) {
|
||||
this.element.parentNode.removeChild(this.element);
|
||||
this.element.remove();
|
||||
}
|
||||
|
||||
if (this._elementStyle) {
|
||||
|
|
|
@ -700,7 +700,7 @@ TextPropertyEditor.prototype = {
|
|||
}
|
||||
}
|
||||
|
||||
this.element.parentNode.removeChild(this.element);
|
||||
this.element.remove();
|
||||
this.ruleEditor.rule.editClosestTextProperty(this.prop, direction);
|
||||
this.nameSpan.textProperty = null;
|
||||
this.valueSpan.textProperty = null;
|
||||
|
|
|
@ -289,7 +289,7 @@ var TreeView = Class({
|
|||
parentContainer.line.focus();
|
||||
},
|
||||
destroy: () => {
|
||||
item.parentNode.removeChild(item);
|
||||
item.remove();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -268,8 +268,8 @@ SplitView.prototype = {
|
|||
}
|
||||
|
||||
let binding = bindings.get(aSummary);
|
||||
aSummary.parentNode.removeChild(aSummary);
|
||||
binding._details.parentNode.removeChild(binding._details);
|
||||
aSummary.remove();
|
||||
binding._details.remove();
|
||||
|
||||
if (binding.onDestroy) {
|
||||
binding.onDestroy(aSummary, binding._details, binding.data);
|
||||
|
|
|
@ -143,7 +143,7 @@ NetRequest.prototype = {
|
|||
* Close network inline preview body.
|
||||
*/
|
||||
closeBody: function () {
|
||||
this.netInfoBodyBox.parentNode.removeChild(this.netInfoBodyBox);
|
||||
this.netInfoBodyBox.remove();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -861,7 +861,7 @@ WebConsoleFrame.prototype = {
|
|||
tempLabel.textContent = "x";
|
||||
doc.documentElement.appendChild(tempLabel);
|
||||
this._inputCharWidth = tempLabel.offsetWidth;
|
||||
tempLabel.parentNode.removeChild(tempLabel);
|
||||
tempLabel.remove();
|
||||
// Calculate the width of the chevron placed at the beginning of the input
|
||||
// box. Remove 4 more pixels to accomodate the padding of the popup.
|
||||
this._chevronWidth = +doc.defaultView.getComputedStyle(this.inputNode)
|
||||
|
|
|
@ -255,7 +255,7 @@ ConfigView.prototype = {
|
|||
input.checked = boolean;
|
||||
}, () => {
|
||||
input.checked = false;
|
||||
tr.parentNode.removeChild(tr);
|
||||
tr.remove();
|
||||
});
|
||||
break;
|
||||
case "number":
|
||||
|
@ -263,7 +263,7 @@ ConfigView.prototype = {
|
|||
this._defaultField.then(number => {
|
||||
input.value = number;
|
||||
}, () => {
|
||||
tr.parentNode.removeChild(tr);
|
||||
tr.remove();
|
||||
});
|
||||
break;
|
||||
case "object":
|
||||
|
@ -271,7 +271,7 @@ ConfigView.prototype = {
|
|||
this._defaultField.then(object => {
|
||||
input.value = JSON.stringify(object);
|
||||
}, () => {
|
||||
tr.parentNode.removeChild(tr);
|
||||
tr.remove();
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
@ -279,7 +279,7 @@ ConfigView.prototype = {
|
|||
this._defaultField.then(string => {
|
||||
input.value = string;
|
||||
}, () => {
|
||||
tr.parentNode.removeChild(tr);
|
||||
tr.remove();
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ function setParent(nodeSelector, newParentSelector) {
|
|||
let newParent = gInspectee.querySelector(newParentSelector);
|
||||
newParent.appendChild(node);
|
||||
} else {
|
||||
node.parentNode.removeChild(node);
|
||||
node.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ addTest(function testWinRace() {
|
|||
promiseDone(gWalker.querySelector(gWalker.rootNode, "#a").then(node => {
|
||||
front = node;
|
||||
let contentNode = gInspectee.querySelector("#a");
|
||||
contentNode.parentNode.removeChild(contentNode);
|
||||
contentNode.remove();
|
||||
// Now wait for that mutation and retain response to come in.
|
||||
return promise.all([
|
||||
gWalker.retainNode(front),
|
||||
|
@ -143,7 +143,7 @@ addTest(function testLoseRace() {
|
|||
front = node;
|
||||
gInspectee.querySelector("#z").parentNode = null;
|
||||
let contentNode = gInspectee.querySelector("#a");
|
||||
contentNode.parentNode.removeChild(contentNode);
|
||||
contentNode.remove();
|
||||
return promiseOnce(gWalker, "new-mutations");
|
||||
}).then(() => {
|
||||
// Verify that we have an outstanding request (no good way to tell that it's a
|
||||
|
|
|
@ -169,7 +169,7 @@ exports.items = [
|
|||
}
|
||||
}
|
||||
if (!args.ifEmptyOnly || !element.hasChildNodes()) {
|
||||
element.parentNode.removeChild(element);
|
||||
element.remove();
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ Inputter.prototype.destroy = function() {
|
|||
this.history.destroy();
|
||||
|
||||
if (this.style) {
|
||||
this.style.parentNode.removeChild(this.style);
|
||||
this.style.remove();
|
||||
this.style = undefined;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ Tooltip.prototype.destroy = function() {
|
|||
this.focusManager.removeMonitoredElement(this.element, 'tooltip');
|
||||
|
||||
if (this.style) {
|
||||
this.style.parentNode.removeChild(this.style);
|
||||
this.style.remove();
|
||||
this.style = undefined;
|
||||
}
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ function processIf(state, node, data) {
|
|||
recurse = false;
|
||||
}
|
||||
if (!recurse) {
|
||||
node.parentNode.removeChild(node);
|
||||
node.remove();
|
||||
}
|
||||
node.removeAttribute("if");
|
||||
return recurse;
|
||||
|
@ -282,7 +282,7 @@ function processForEach(state, node, data) {
|
|||
handleAsync(evaled, node, function (reply, siblingNode) {
|
||||
processForEachLoop(cState, reply, node, siblingNode, data, paramName);
|
||||
});
|
||||
node.parentNode.removeChild(node);
|
||||
node.remove();
|
||||
} catch (ex) {
|
||||
handleError(state, "Error with " + value + "'", ex);
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ function processTextNode(state, node, data) {
|
|||
}
|
||||
});
|
||||
});
|
||||
node.parentNode.removeChild(node);
|
||||
node.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -451,7 +451,7 @@ function handleAsync(thing, siblingNode, inserter) {
|
|||
thing.then(function (delayed) {
|
||||
inserter(delayed, tempNode);
|
||||
if (tempNode.parentNode != null) {
|
||||
tempNode.parentNode.removeChild(tempNode);
|
||||
tempNode.remove();
|
||||
}
|
||||
}).then(null, function (error) {
|
||||
console.error(error.stack);
|
||||
|
|
|
@ -18,7 +18,7 @@ function b2()
|
|||
{
|
||||
f2.contentWindow.history.forward();
|
||||
f2.contentWindow.location.reload();
|
||||
f1.parentNode.removeChild(f1);
|
||||
f1.remove();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
|
||||
// remove undisplayed errors to avoid bug 39098
|
||||
var errContainer = document.getElementById("errorContainer");
|
||||
errContainer.parentNode.removeChild(errContainer);
|
||||
errContainer.remove();
|
||||
|
||||
var className = getCSSClass();
|
||||
if (className && className != "expertBadCert") {
|
||||
|
@ -175,7 +175,7 @@
|
|||
// Remove the override block for non-certificate errors. CSS-hiding
|
||||
// isn't good enough here, because of bug 39098
|
||||
var secOverride = document.getElementById("securityOverrideDiv");
|
||||
secOverride.parentNode.removeChild(secOverride);
|
||||
secOverride.remove();
|
||||
}
|
||||
|
||||
if (err == "inadequateSecurityError") {
|
||||
|
|
|
@ -102,7 +102,7 @@ function addDiv(t, attrs) {
|
|||
if (t && typeof t.add_cleanup === 'function') {
|
||||
t.add_cleanup(function() {
|
||||
if (div.parentNode) {
|
||||
div.parentNode.removeChild(div);
|
||||
div.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ function foo()
|
|||
window.getSelection().addRange(r);
|
||||
|
||||
var everything = document.getElementById("everything");
|
||||
everything.parentNode.removeChild(everything);
|
||||
everything.remove();
|
||||
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
function zap()
|
||||
{
|
||||
var j = document.getElementById("j");
|
||||
j.parentNode.removeChild(j);
|
||||
j.remove();
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ function s()
|
|||
var newSpan = document.createElement("span");
|
||||
newSpan.contentEditable = "true";
|
||||
nodes[0].appendChild(newSpan);
|
||||
x.parentNode.removeChild(x);
|
||||
x.remove();
|
||||
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
return s;
|
||||
}
|
||||
|
||||
function remove(n) { n.parentNode.removeChild(n); }
|
||||
function remove(n) { n.remove(); }
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
|
|
|
@ -7,7 +7,7 @@ function boom()
|
|||
{
|
||||
var f = document.getElementById("f");
|
||||
var w = f.contentWindow;
|
||||
f.parentNode.removeChild(f);
|
||||
f.remove();
|
||||
w.localStorage;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ function boom()
|
|||
var r = d.documentElement;
|
||||
d.removeChild(r);
|
||||
document.adoptNode(r);
|
||||
f.parentNode.removeChild(f);
|
||||
f.remove();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -15,7 +15,7 @@ function boom()
|
|||
d.removeChild(r);
|
||||
w.getSelection().collapse(r,0);
|
||||
document.adoptNode(r);
|
||||
f.parentNode.removeChild(f);
|
||||
f.remove();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -9,7 +9,7 @@ var docElement = document.body;
|
|||
document.addEventListener("DOMContentLoaded", CFcrash);
|
||||
function CFcrash() {
|
||||
setTimeout('try { test5.appendChild(test4); } catch(e) {}', 50);
|
||||
try { test4.parentNode.removeChild(test4); test4 = test1; } catch(e) {}
|
||||
try { test4.remove(); test4 = test1; } catch(e) {}
|
||||
try { test4.insertBefore(test2, test4.firstChils); } catch(e) { }
|
||||
try { test2.textContent = test3.textContent; } catch(e) {}
|
||||
}</script>>
|
|
@ -17,7 +17,7 @@ var test6=document.getElementById("console").appendChild(document.createElement(
|
|||
|
||||
test6.appendChild(document.createElement("img"))
|
||||
|
||||
test5.parentNode.removeChild(test5)
|
||||
test5.remove()
|
||||
test5.innerHTML=''
|
||||
test5.appendChild(test6.cloneNode(true))
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<noframes dir=auto id=test4></noframes><vbox id=test5>K<csaction id=test3><script>
|
||||
function reference(domNode) { this.domNode = domNode;} function walk(a, currentPrefix, index, domNode) { if(domNode == null) return; newPrefix = currentPrefix + "_" + index; walk(a, domNode.nextSibling); walk(a, domNode.firstChild); a[newPrefix] = new reference(domNode); } function clear() { var a = new Array(); walk(a, "", 0, document.documentElement); for(key in a) {a[key].domNode.parentNode.removeChild(a[key].domNode); }}
|
||||
function reference(domNode) { this.domNode = domNode;} function walk(a, currentPrefix, index, domNode) { if(domNode == null) return; newPrefix = currentPrefix + "_" + index; walk(a, domNode.nextSibling); walk(a, domNode.firstChild); a[newPrefix] = new reference(domNode); } function clear() { var a = new Array(); walk(a, "", 0, document.documentElement); for(key in a) {a[key].domNode.remove(); }}
|
||||
function crash() {
|
||||
try { test1 = document.createElementNS("http://www.w3.org/2000/svg", "text"); } catch(e) {}
|
||||
try { test2 = test3.cloneNode(true); } catch(e) {}
|
||||
|
|
|
@ -8,7 +8,7 @@ nt/b|+K E:</p>
|
|||
var docElement = document.body ? document.body : document.documentElement;
|
||||
document.addEventListener("DOMContentLoaded", CFcrash);
|
||||
function CFcrash() {
|
||||
try { test1.parentNode.removeChild(test1); } catch(e) {}
|
||||
try { test1.remove(); } catch(e) {}
|
||||
try { test2.innerHTML = ''; } catch(e) {}
|
||||
try { test3.outerHTML = test4.outerHTML; } catch(e) {}
|
||||
}</script>
|
|
@ -1,5 +1,5 @@
|
|||
<fieldset id=test1>>>>><figure>w.)+</figure>>.c34::-moz-page-sequence { outline-color: invert }<script>
|
||||
function reference(domNode) { this.domNode = domNode;} function walk(a, currentPrefix, index, domNode) { if(domNode == null) return; newPrefix = currentPrefix + "_" + index; walk(a, domNode.firstChild); a[newPrefix] = new reference(domNode); } function clear() { var a = new Array(); walk(a, "", 0, document.documentElement); for(key in a) {a[key].domNode.parentNode.removeChild(a[key].domNode); }}
|
||||
function reference(domNode) { this.domNode = domNode;} function walk(a, currentPrefix, index, domNode) { if(domNode == null) return; newPrefix = currentPrefix + "_" + index; walk(a, domNode.firstChild); a[newPrefix] = new reference(domNode); } function clear() { var a = new Array(); walk(a, "", 0, document.documentElement); for(key in a) {a[key].domNode.remove(); }}
|
||||
document.addEventListener("DOMContentLoaded", CFcrash);
|
||||
function CFcrash() {
|
||||
setTimeout("try { clear(); } catch(e) {}", 1419);
|
||||
|
|
|
@ -8,8 +8,8 @@ setTimeout("CFcrash()", 231);
|
|||
}
|
||||
document.addEventListener("DOMContentLoaded", initCF);
|
||||
function CFcrash() {
|
||||
try { if (test1 != docElement) { test1.parentNode.removeChild(test1); test1 = test4; }} catch(e) {}
|
||||
try { if (test1 != docElement) { test1.parentNode.removeChild(test1); }} catch(e) {}
|
||||
try { if (test1 != docElement) { test1.remove(); test1 = test4; }} catch(e) {}
|
||||
try { if (test1 != docElement) { test1.remove(); }} catch(e) {}
|
||||
try { test4.appendChild(test3); } catch(e) {}
|
||||
try { test3.appendChild(test2); } catch(e) {}
|
||||
try { test4.setAttribute("dir", "invalid"); } catch(e) {}
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
|
||||
function recvDoneMessage(message) {
|
||||
if (test_state == "remote") {
|
||||
test_node.parentNode.removeChild(test_node);
|
||||
test_node.remove();
|
||||
run_tests("inprocess");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=549682
|
|||
function finish() {
|
||||
opener.setTimeout("done()", 0);
|
||||
var i = document.getElementById("ifr");
|
||||
i.parentNode.removeChild(i); // This is a crash test!
|
||||
i.remove(); // This is a crash test!
|
||||
window.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
} ],
|
||||
[ "html2", "Foo", "Removing HTML <title>",
|
||||
function(doc){
|
||||
var t = doc.getElementById("t"); t.parentNode.removeChild(t);
|
||||
var t = doc.getElementById("t"); t.remove();
|
||||
} ],
|
||||
[ "html3", "Hello", "Appending HTML <title> element to root element",
|
||||
function(doc){
|
||||
|
@ -141,7 +141,7 @@
|
|||
} ],
|
||||
[ "svg2", "", "Removing SVG <title>",
|
||||
function(doc){
|
||||
var t = doc.getElementById("t"); t.parentNode.removeChild(t);
|
||||
var t = doc.getElementById("t"); t.remove();
|
||||
} ] ];
|
||||
|
||||
var titleWindow = window;
|
||||
|
|
|
@ -16,7 +16,7 @@ function modifySelection(s) {
|
|||
g.removeAllRanges();
|
||||
g.addRange(a);
|
||||
window.setTimeout(function () {
|
||||
e.parentNode.removeChild(e);
|
||||
e.remove();
|
||||
g.removeAllRanges();
|
||||
g.addRange(l);
|
||||
}, 0)
|
||||
|
|
|
@ -295,7 +295,7 @@
|
|||
runTest( ecss, "SyntaxError: Fragment", fragment, false );
|
||||
cacheCheck( "Fragment", fragment );
|
||||
|
||||
root.parentNode.removeChild( root );
|
||||
root.remove( );
|
||||
|
||||
interfaceCheck(document, "Document");
|
||||
runTest( css, "Document", document, true );
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
|
||||
iterator.detach();
|
||||
|
||||
n.parentNode.parentNode.removeChild(n.parentNode);
|
||||
n.parentNode.remove();
|
||||
// Drop any node references passed into this function.
|
||||
for (var i = 0; i < arguments.length; ++i)
|
||||
arguments[i] = null;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
function removeNode(n) {
|
||||
n.parentNode.removeChild(n);
|
||||
n.remove();
|
||||
}
|
||||
var initInner = $('content').innerHTML;
|
||||
var content = $('content');
|
||||
|
|
|
@ -85,7 +85,7 @@ function nextTest() {
|
|||
}, function() {
|
||||
ok(true, div.getAttribute("style") + " passed");
|
||||
hasExpectedFlavors();
|
||||
div.parentNode.removeChild(div);
|
||||
div.remove();
|
||||
nextTest();
|
||||
}, function() {
|
||||
ok(false, "failed to copy the expected content to the clipboard");
|
||||
|
|
|
@ -58,7 +58,7 @@ function generateLinkInLink(id, desc) {
|
|||
is(this.contentDocument.documentElement.textContent, "PASS", desc);
|
||||
// Have to remove the iframe we used from the DOM, because the harness is
|
||||
// stupid and doesn't have enough space for more than one iframe.
|
||||
$(id).parentNode.removeChild($(id));
|
||||
$(id).remove();
|
||||
doNextTest();
|
||||
};
|
||||
return [innerA, $(id).contentWindow];
|
||||
|
@ -88,7 +88,7 @@ function generateInputInLink(id, desc) {
|
|||
is(this.contentDocument.documentElement.textContent, "PASS?", desc);
|
||||
// Have to remove the iframe we used from the DOM, because the harness is
|
||||
// stupid and doesn't have enough space for more than one iframe.
|
||||
$(id).parentNode.removeChild($(id));
|
||||
$(id).remove();
|
||||
doNextTest();
|
||||
};
|
||||
var input = doc.getElementById("submit");
|
||||
|
@ -120,7 +120,7 @@ function generateButtonInLink(id, desc) {
|
|||
is(this.contentDocument.documentElement.textContent, "PASS?", desc);
|
||||
// Have to remove the iframe we used from the DOM, because the harness is
|
||||
// stupid and doesn't have enough space for more than one iframe.
|
||||
$(id).parentNode.removeChild($(id));
|
||||
$(id).remove();
|
||||
doNextTest();
|
||||
};
|
||||
var button = doc.getElementById("submit");
|
||||
|
|
|
@ -27,7 +27,7 @@ function runRangeTest()
|
|||
// it must be splitted. But in this case boundary point doesn't have parent,
|
||||
// so splitting doesn't work.
|
||||
var zz = document.getElementById("connectedDiv").firstChild;
|
||||
zz.parentNode.removeChild(zz);
|
||||
zz.remove();
|
||||
var range = document.createRange();
|
||||
var hadException = false;
|
||||
try {
|
||||
|
|
|
@ -38,7 +38,7 @@ addLoadEvent(SimpleTest.finish);
|
|||
<script>
|
||||
function doe() {
|
||||
window.addEventListener('DOMAttrModified', function()
|
||||
{window.frameElement.parentNode.removeChild(window.frameElement);}, true);
|
||||
{window.frameElement.remove();}, true);
|
||||
document.documentElement.appendChild(document.getElementsByTagName('box')[0]);
|
||||
}
|
||||
setTimeout(doe,0);
|
||||
|
|
|
@ -193,7 +193,7 @@ function insertBefore(newChild, existing) {
|
|||
existing.parentNode.insertBefore(newChild, existing);
|
||||
}
|
||||
function removeNode(child) {
|
||||
child.parentNode.removeChild(child);
|
||||
child.remove();
|
||||
}
|
||||
|
||||
insertAfter(t1, div);
|
||||
|
|
|
@ -154,7 +154,7 @@ function insertBefore(newChild, existing) {
|
|||
existing.parentNode.insertBefore(newChild, existing);
|
||||
}
|
||||
function removeNode(child) {
|
||||
child.parentNode.removeChild(child);
|
||||
child.remove();
|
||||
}
|
||||
|
||||
insertAfter(t1, i1_1);
|
||||
|
|
|
@ -253,7 +253,7 @@ for (i = 0; i < spans.length; ++i) {
|
|||
is(spans[i].attributes.length, attrCount, "didn't have maxed out attrs");
|
||||
}
|
||||
while (spans.length) {
|
||||
spans[0].parentNode.removeChild(spans[0]);
|
||||
spans[0].remove();
|
||||
}
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -46,7 +46,7 @@ function test3() {
|
|||
ifr.contentDocument.getElementsByTagName("input")[0].focus();
|
||||
is(firstDoc.activeElement, firstDoc.body,
|
||||
"Active element should be body by default! (3)");
|
||||
ifr.parentNode.removeChild(ifr);
|
||||
ifr.remove();
|
||||
is(firstDoc.activeElement, firstDoc.body,
|
||||
"Active element should be body by default! (4)");
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -39,7 +39,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=713564
|
|||
|
||||
var previousBgColor = window.getComputedStyle(content).
|
||||
getPropertyValue("background-color");
|
||||
var_sheet.parentNode.removeChild(var_sheet);
|
||||
var_sheet.remove();
|
||||
insertLinkToVarSSAndRun(function() {
|
||||
is(window.getComputedStyle(content).getPropertyValue("background-color"),
|
||||
previousBgColor,
|
||||
|
|
|
@ -783,8 +783,8 @@ limitations under the License.
|
|||
|
||||
it('handles root/target elements not yet in the DOM', function(done) {
|
||||
|
||||
rootEl.parentNode.removeChild(rootEl);
|
||||
targetEl1.parentNode.removeChild(targetEl1);
|
||||
rootEl.remove();
|
||||
targetEl1.remove();
|
||||
|
||||
var spy = sinon.spy();
|
||||
io = new IntersectionObserver(spy, {root: rootEl});
|
||||
|
@ -813,7 +813,7 @@ limitations under the License.
|
|||
}, ASYNC_TIMEOUT);
|
||||
},
|
||||
function(done) {
|
||||
grandParentEl.parentNode.removeChild(grandParentEl);
|
||||
grandParentEl.remove();
|
||||
spy.waitForNotification(function() {
|
||||
expect(spy.callCount).to.be(2);
|
||||
var records = sortRecords(spy.lastCall.args[0]);
|
||||
|
@ -835,7 +835,7 @@ limitations under the License.
|
|||
}, ASYNC_TIMEOUT);
|
||||
},
|
||||
function(done) {
|
||||
rootEl.parentNode.removeChild(rootEl);
|
||||
rootEl.remove();
|
||||
spy.waitForNotification(function() {
|
||||
expect(spy.callCount).to.be(4);
|
||||
var records = sortRecords(spy.lastCall.args[0]);
|
||||
|
@ -1198,7 +1198,7 @@ limitations under the License.
|
|||
*/
|
||||
function removeStyles() {
|
||||
var styles = document.getElementById('styles');
|
||||
styles.parentNode.removeChild(styles);
|
||||
styles.remove();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1207,7 +1207,7 @@ limitations under the License.
|
|||
*/
|
||||
function removeFixtures() {
|
||||
var fixtures = document.getElementById('fixtures');
|
||||
fixtures.parentNode.removeChild(fixtures);
|
||||
fixtures.remove();
|
||||
|
||||
rootEl = null;
|
||||
grandParentEl = null;
|
||||
|
|
|
@ -31,7 +31,7 @@ document.body.appendChild(testtag);
|
|||
is(list[0], testtag, "Should expose elements in the list");
|
||||
is(list[1], "PASSProto1", "Should expose proto properties out of range on the list");
|
||||
|
||||
testtag.parentNode.removeChild(testtag);
|
||||
testtag.remove();
|
||||
|
||||
is(list[0], "PASSProto0", "Should expose proto properties on the list after removal");
|
||||
is(list[1], "PASSProto1", "Should expose more proto properties on the list after removal");
|
||||
|
|
|
@ -51,7 +51,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=823228
|
|||
// set() hook test
|
||||
window[1] = "FAIL";
|
||||
is(window[1].name, "y", "Second frame is still y");
|
||||
y.parentNode.removeChild(y);
|
||||
y.remove();
|
||||
ok(!("1" in window), "We no longer have two subframes");
|
||||
is(window[1], undefined, "We should not have a value here");
|
||||
|
||||
|
@ -72,7 +72,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=823228
|
|||
Object.defineProperty(window, "1", { value: "FAIL2", configurable: true,
|
||||
writable: true });
|
||||
});
|
||||
y.parentNode.removeChild(y);
|
||||
y.remove();
|
||||
ok(!("1" in window), "We no longer have two subframes, again");
|
||||
is(window[1], undefined, "We should not have a value here either");
|
||||
|
||||
|
@ -95,7 +95,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=823228
|
|||
ok(!desc.writable, "Subframe should not be writable");
|
||||
is(desc.value, y.contentWindow, "Subframe should have correct value");
|
||||
|
||||
y.parentNode.removeChild(y);
|
||||
y.remove();
|
||||
is(window[1], undefined, "And now we should be back to no [1] property");
|
||||
|
||||
// And more defineProperty()
|
||||
|
@ -128,7 +128,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=823228
|
|||
// Delete tests
|
||||
is(delete window[1], false, "Deleting supported index should return false");
|
||||
is(window[1], y.contentWindow, "Shouldn't be able to delete a supported index");
|
||||
y.parentNode.removeChild(y);
|
||||
y.remove();
|
||||
is(window[1], undefined,
|
||||
"And now we should have no property here");
|
||||
is(delete window[1], true, "Deleting unsupported index should return true");
|
||||
|
|
|
@ -197,7 +197,7 @@ function processParsedDocument(doc) {
|
|||
var i;
|
||||
for (i = splits.length - 1; i >= 0; i--) {
|
||||
var node = splits.item(i);
|
||||
node.parentNode.removeChild(node);
|
||||
node.remove();
|
||||
}
|
||||
splits = null;
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ function startTest(test, token) {
|
|||
|
||||
function doneTest(e) {
|
||||
var v = e.target;
|
||||
v.parentNode.removeChild(v);
|
||||
v.remove();
|
||||
document.manager.finished(v.token);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ function boom()
|
|||
{
|
||||
var frame = document.getElementById("f");
|
||||
var frameWin = frame.contentWindow;
|
||||
frame.parentNode.removeChild(frame);
|
||||
frame.remove();
|
||||
frameWin.onmouseover = function(){};
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ function* tests() {
|
|||
sendMouseEvent("mousemove", label);
|
||||
sendMouseEvent("mousedown", label);
|
||||
yield undefined;
|
||||
label.parentNode.removeChild(label);
|
||||
label.remove();
|
||||
yield undefined;
|
||||
compareSnapshots_(normalButtonCanvas, currentSnapshot, true, "Removing the label should have unpressed the button.");
|
||||
sendMouseEvent("mouseup", label);
|
||||
|
|
|
@ -136,7 +136,7 @@ function* tests() {
|
|||
sendMouseEvent("mousemove", label);
|
||||
sendMouseEvent("mousedown", label);
|
||||
yield undefined;
|
||||
label.parentNode.removeChild(label);
|
||||
label.remove();
|
||||
yield undefined;
|
||||
compareSnapshots_(normalButtonCanvas, currentSnapshot, true, "Removing the label should have unpressed the button.");
|
||||
sendMouseEvent("mouseup", label);
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
log("gotpointercapture", target1);
|
||||
setTimeout(function() {
|
||||
isDisconnected = true;
|
||||
target0.parentNode.removeChild(target0);
|
||||
target0.remove();
|
||||
}, 250);
|
||||
});
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
var target0 = document.getElementById("target0");
|
||||
var target1 = document.getElementById("target1");
|
||||
|
||||
target1.parentNode.removeChild(target1);
|
||||
target1.remove();
|
||||
|
||||
on_event(target0, "pointerdown", function (event) {
|
||||
detected_pointertypes[ event.pointerType ] = true;
|
||||
|
|
|
@ -34,7 +34,7 @@ function doTest() {
|
|||
pre.textContent = pre.textContent + pre.textContent;
|
||||
ok(eventCounter == 1, "DOMNodeInserted should have been dispatched");
|
||||
|
||||
pre.parentNode.removeChild(pre);
|
||||
pre.remove();
|
||||
i2.contentDocument.adoptNode(pre);
|
||||
i2.contentDocument.body.appendChild(pre);
|
||||
ok(eventCounter == 2, "DOMNodeInserted should have been dispatched in the new document");
|
||||
|
|
|
@ -182,7 +182,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=409604
|
|||
function destroyUnfocusableElement() {
|
||||
var el = document.getElementById(unfocusableElementId);
|
||||
ok(el != null, "unfocusable element not found");
|
||||
el.parentNode.removeChild(el);
|
||||
el.remove();
|
||||
ok(document.getElementById(unfocusableElementId) == null, "unfocusable element not properly removed");
|
||||
}
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ function testRemovingElement() {
|
|||
|
||||
var touchEvents = 0;
|
||||
var removeTarget = function(aEvent) {
|
||||
aEvent.target.parentNode.removeChild(aEvent.target);
|
||||
aEvent.target.remove();
|
||||
};
|
||||
|
||||
var checkTarget = function(aEvent) {
|
||||
|
|
|
@ -134,7 +134,7 @@ function mpTestLegacyEventSent(eventInfo) {
|
|||
var handler = createHandlerWithTypeCheck(eventInfo.legacy_name,
|
||||
function() {
|
||||
// When event-handler is done, clean up & resolve:
|
||||
div.parentNode.removeChild(div);
|
||||
div.remove();
|
||||
resolve();
|
||||
});
|
||||
div.addEventListener(eventInfo.legacy_name, handler);
|
||||
|
@ -166,7 +166,7 @@ function mpTestModernBeatsLegacy(eventInfo) {
|
|||
"' should be invoked when there's a handler registered for " +
|
||||
"both modern & legacy event type on the same node");
|
||||
// When event-handler is done, clean up & resolve:
|
||||
div.parentNode.removeChild(div);
|
||||
div.remove();
|
||||
resolve();
|
||||
});
|
||||
|
||||
|
@ -213,7 +213,7 @@ function mpTestDiffListenersEventBubbling(eventInfo) {
|
|||
is(e, eventSentToTarget,
|
||||
"Same event object should bubble, despite difference in type");
|
||||
// Clean up.
|
||||
grandparent.parentNode.removeChild(grandparent);
|
||||
grandparent.remove();
|
||||
resolve();
|
||||
}));
|
||||
|
||||
|
@ -262,7 +262,7 @@ function mpTestDiffListenersEventCapturing(eventInfo) {
|
|||
ok(didEventFireOnParent,
|
||||
"Event should have fired on parent");
|
||||
// Clean up.
|
||||
grandparent.parentNode.removeChild(grandparent);
|
||||
grandparent.remove();
|
||||
resolve();
|
||||
}), true);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ function boom()
|
|||
document.execCommand("indent", false, null);
|
||||
b.contentEditable = "false";
|
||||
span.appendChild(i);
|
||||
i.parentNode.removeChild(i);
|
||||
i.remove();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -63,7 +63,7 @@ function enter1(event) {
|
|||
"FSE should match :fullscreen");
|
||||
var fse = fullScreenElement();
|
||||
addFullscreenChangeContinuation("exit", exit1);
|
||||
fse.parentNode.removeChild(fse);
|
||||
fse.remove();
|
||||
is(document.fullscreenElement, null,
|
||||
"Full-screen element should be null after removing.");
|
||||
document.body.appendChild(fse);
|
||||
|
@ -157,7 +157,7 @@ function enter4(event) {
|
|||
|
||||
// Remove full-screen ancestor element from document, verify it stops being reported as current FSE.
|
||||
addFullscreenChangeContinuation("exit", exit_to_arg_test_1);
|
||||
container.parentNode.removeChild(container);
|
||||
container.remove();
|
||||
is(document.fullscreenElement, null,
|
||||
"Should not have a full-screen element again.");
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ function e(id) {
|
|||
}
|
||||
|
||||
function removeElement(e) {
|
||||
e.parentNode.removeChild(e);
|
||||
e.remove();
|
||||
}
|
||||
|
||||
const isMacOs = navigator.appVersion.indexOf("Macintosh") != -1;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче