Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws.
This commit is contained in:
@@ -392,7 +392,7 @@ function* testSubtreeRule(browser, target, rule, expected) {
|
|||||||
yield ContentTask.spawn(browser, target.id, id => {
|
yield ContentTask.spawn(browser, target.id, id => {
|
||||||
let elm = content.document.getElementById(id);
|
let elm = content.document.getElementById(id);
|
||||||
while (elm.firstChild) {
|
while (elm.firstChild) {
|
||||||
elm.removeChild(elm.firstChild);
|
elm.firstChild.remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
yield updateAccessibleIfNeeded(onEvent, target);
|
yield updateAccessibleIfNeeded(onEvent, target);
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ addAccessibleTask(`
|
|||||||
yield ContentTask.spawn(browser, {}, () => {
|
yield ContentTask.spawn(browser, {}, () => {
|
||||||
// Remove HTML element.
|
// Remove HTML element.
|
||||||
let docNode = content.document.getElementById('iframe').contentDocument;
|
let docNode = content.document.getElementById('iframe').contentDocument;
|
||||||
docNode.removeChild(docNode.firstChild);
|
docNode.firstChild.remove();
|
||||||
});
|
});
|
||||||
let event = yield reorderEventPromise;
|
let event = yield reorderEventPromise;
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ addAccessibleTask(`
|
|||||||
let docEl =
|
let docEl =
|
||||||
content.document.getElementById('iframe').contentDocument.documentElement;
|
content.document.getElementById('iframe').contentDocument.documentElement;
|
||||||
// Remove aftermath of this test before next test starts.
|
// Remove aftermath of this test before next test starts.
|
||||||
docEl.removeChild(docEl.firstChild);
|
docEl.firstChild.remove();
|
||||||
});
|
});
|
||||||
// Make sure reorder event was fired and that the input was removed.
|
// Make sure reorder event was fired and that the input was removed.
|
||||||
yield reorderEventPromise;
|
yield reorderEventPromise;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ addAccessibleTask('<select id="select"></select>', function*(browser, accDoc) {
|
|||||||
// Remove grouping from combobox
|
// Remove grouping from combobox
|
||||||
yield ContentTask.spawn(browser, {}, () => {
|
yield ContentTask.spawn(browser, {}, () => {
|
||||||
let contentSelect = content.document.getElementById('select');
|
let contentSelect = content.document.getElementById('select');
|
||||||
contentSelect.removeChild(contentSelect.firstChild);
|
contentSelect.firstChild.remove();
|
||||||
});
|
});
|
||||||
yield onEvent;
|
yield onEvent;
|
||||||
|
|
||||||
|
|||||||
@@ -414,8 +414,8 @@
|
|||||||
var l1 = doc.firstChild;
|
var l1 = doc.firstChild;
|
||||||
this.target = l1.firstChild;
|
this.target = l1.firstChild;
|
||||||
var l2 = doc.lastChild;
|
var l2 = doc.lastChild;
|
||||||
l1.DOMNode.removeChild(l1.DOMNode.firstChild);
|
l1.DOMNode.firstChild.remove();
|
||||||
l2.DOMNode.removeChild(l2.DOMNode.firstChild);
|
l2.DOMNode.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.check = function hideHideNDestroyDoc_check()
|
this.check = function hideHideNDestroyDoc_check()
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
this.invoke = function removeChildSpan_invoke()
|
this.invoke = function removeChildSpan_invoke()
|
||||||
{
|
{
|
||||||
// remove HTML span, a first child of the node
|
// remove HTML span, a first child of the node
|
||||||
this.DOMNode.removeChild(this.DOMNode.firstChild);
|
this.DOMNode.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getID = function removeChildSpan_getID()
|
this.getID = function removeChildSpan_getID()
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
this.DOMNode.removeChild(this.DOMNode.lastChild);
|
this.DOMNode.removeChild(this.DOMNode.lastChild);
|
||||||
} else {
|
} else {
|
||||||
while (this.DOMNode.firstChild)
|
while (this.DOMNode.firstChild)
|
||||||
this.DOMNode.removeChild(this.DOMNode.firstChild);
|
this.DOMNode.firstChild.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ function testNameForSubtreeRule(aElm, aRule)
|
|||||||
waitForEvent(EVENT_REORDER, aElm, gTestIterator.iterateNext, gTestIterator);
|
waitForEvent(EVENT_REORDER, aElm, gTestIterator.iterateNext, gTestIterator);
|
||||||
|
|
||||||
while (aElm.firstChild)
|
while (aElm.firstChild)
|
||||||
aElm.removeChild(aElm.firstChild);
|
aElm.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -266,7 +266,7 @@
|
|||||||
|
|
||||||
// Remove HTML element.
|
// Remove HTML element.
|
||||||
var docNode = getDocNode(aID);
|
var docNode = getDocNode(aID);
|
||||||
docNode.removeChild(docNode.firstChild);
|
docNode.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getID = function removeHTMLFromIFrameDoc_getID()
|
this.getID = function removeHTMLFromIFrameDoc_getID()
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
this.invoke = function removeRemove_invoke()
|
this.invoke = function removeRemove_invoke()
|
||||||
{
|
{
|
||||||
getNode(aContainer).removeChild(getNode(aContainer).firstChild);
|
getNode(aContainer).firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.finalCheck = function removeRemove_finalCheck()
|
this.finalCheck = function removeRemove_finalCheck()
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
this.invoke = function removeOptGroup_invoke()
|
this.invoke = function removeOptGroup_invoke()
|
||||||
{
|
{
|
||||||
this.option1Node = this.selectNode.firstChild.firstChild;
|
this.option1Node = this.selectNode.firstChild.firstChild;
|
||||||
this.selectNode.removeChild(this.selectNode.firstChild);
|
this.selectNode.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.eventSeq = [
|
this.eventSeq = [
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ var ctrlTab = {
|
|||||||
aPreview._tab = aTab;
|
aPreview._tab = aTab;
|
||||||
|
|
||||||
if (aPreview.firstChild)
|
if (aPreview.firstChild)
|
||||||
aPreview.removeChild(aPreview.firstChild);
|
aPreview.firstChild.remove();
|
||||||
if (aTab) {
|
if (aTab) {
|
||||||
let canvasWidth = this.canvasWidth;
|
let canvasWidth = this.canvasWidth;
|
||||||
let canvasHeight = this.canvasHeight;
|
let canvasHeight = this.canvasHeight;
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ var gFxAccounts = {
|
|||||||
populateSendTabToDevicesMenu(devicesPopup, url, title) {
|
populateSendTabToDevicesMenu(devicesPopup, url, title) {
|
||||||
// remove existing menu items
|
// remove existing menu items
|
||||||
while (devicesPopup.hasChildNodes()) {
|
while (devicesPopup.hasChildNodes()) {
|
||||||
devicesPopup.removeChild(devicesPopup.firstChild);
|
devicesPopup.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
const fragment = document.createDocumentFragment();
|
const fragment = document.createDocumentFragment();
|
||||||
|
|||||||
@@ -746,7 +746,7 @@ HistoryMenu.prototype = {
|
|||||||
|
|
||||||
// remove existing menu items
|
// remove existing menu items
|
||||||
while (undoPopup.hasChildNodes())
|
while (undoPopup.hasChildNodes())
|
||||||
undoPopup.removeChild(undoPopup.firstChild);
|
undoPopup.firstChild.remove();
|
||||||
|
|
||||||
// no restorable tabs, so make sure menu is disabled, and return
|
// no restorable tabs, so make sure menu is disabled, and return
|
||||||
if (this._getClosedTabCount() == 0) {
|
if (this._getClosedTabCount() == 0) {
|
||||||
@@ -782,7 +782,7 @@ HistoryMenu.prototype = {
|
|||||||
|
|
||||||
// remove existing menu items
|
// remove existing menu items
|
||||||
while (undoPopup.hasChildNodes())
|
while (undoPopup.hasChildNodes())
|
||||||
undoPopup.removeChild(undoPopup.firstChild);
|
undoPopup.firstChild.remove();
|
||||||
|
|
||||||
// no restorable windows, so make sure menu is disabled, and return
|
// no restorable windows, so make sure menu is disabled, and return
|
||||||
if (SessionStore.getClosedWindowCount() == 0) {
|
if (SessionStore.getClosedWindowCount() == 0) {
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ function resetPageInfo(args) {
|
|||||||
/* Reset Feeds Tab */
|
/* Reset Feeds Tab */
|
||||||
var feedListbox = document.getElementById("feedListbox");
|
var feedListbox = document.getElementById("feedListbox");
|
||||||
while (feedListbox.firstChild)
|
while (feedListbox.firstChild)
|
||||||
feedListbox.removeChild(feedListbox.firstChild);
|
feedListbox.firstChild.remove();
|
||||||
|
|
||||||
/* Call registered overlay reset functions */
|
/* Call registered overlay reset functions */
|
||||||
onResetRegistry.forEach(function(func) { func(); });
|
onResetRegistry.forEach(function(func) { func(); });
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ function setText(id, value) {
|
|||||||
element.value = value;
|
element.value = value;
|
||||||
else {
|
else {
|
||||||
if (element.hasChildNodes())
|
if (element.hasChildNodes())
|
||||||
element.removeChild(element.firstChild);
|
element.firstChild.remove();
|
||||||
var textNode = document.createTextNode(value);
|
var textNode = document.createTextNode(value);
|
||||||
element.appendChild(textNode);
|
element.appendChild(textNode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ function createUserContextMenu(event, {
|
|||||||
useAccessKeys = true
|
useAccessKeys = true
|
||||||
} = {}) {
|
} = {}) {
|
||||||
while (event.target.hasChildNodes()) {
|
while (event.target.hasChildNodes()) {
|
||||||
event.target.removeChild(event.target.firstChild);
|
event.target.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
let bundle = document.getElementById("bundle_browser");
|
let bundle = document.getElementById("bundle_browser");
|
||||||
|
|||||||
@@ -244,12 +244,12 @@ const CustomizableWidgets = [
|
|||||||
|
|
||||||
let recentlyClosedTabs = doc.getElementById("PanelUI-recentlyClosedTabs");
|
let recentlyClosedTabs = doc.getElementById("PanelUI-recentlyClosedTabs");
|
||||||
while (recentlyClosedTabs.firstChild) {
|
while (recentlyClosedTabs.firstChild) {
|
||||||
recentlyClosedTabs.removeChild(recentlyClosedTabs.firstChild);
|
recentlyClosedTabs.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
let recentlyClosedWindows = doc.getElementById("PanelUI-recentlyClosedWindows");
|
let recentlyClosedWindows = doc.getElementById("PanelUI-recentlyClosedWindows");
|
||||||
while (recentlyClosedWindows.firstChild) {
|
while (recentlyClosedWindows.firstChild) {
|
||||||
recentlyClosedWindows.removeChild(recentlyClosedWindows.firstChild);
|
recentlyClosedWindows.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
let utils = RecentlyClosedTabsAndWindowsMenuUtils;
|
let utils = RecentlyClosedTabsAndWindowsMenuUtils;
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ const PanelUI = {
|
|||||||
|
|
||||||
// Remove all buttons from the view
|
// Remove all buttons from the view
|
||||||
while (items.firstChild) {
|
while (items.firstChild) {
|
||||||
items.removeChild(items.firstChild);
|
items.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the current set of menuitems of the Help menu to this view
|
// Add the current set of menuitems of the Help menu to this view
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ FeedWriter.prototype = {
|
|||||||
let element = this._document.getElementById(id);
|
let element = this._document.getElementById(id);
|
||||||
let textNode = text.createDocumentFragment(element);
|
let textNode = text.createDocumentFragment(element);
|
||||||
while (element.hasChildNodes())
|
while (element.hasChildNodes())
|
||||||
element.removeChild(element.firstChild);
|
element.firstChild.remove();
|
||||||
element.appendChild(textNode);
|
element.appendChild(textNode);
|
||||||
if (text.base) {
|
if (text.base) {
|
||||||
element.setAttributeNS(XML_NS, "base", text.base.spec);
|
element.setAttributeNS(XML_NS, "base", text.base.spec);
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ var MigrationWizard = { /* exported MigrationWizard */
|
|||||||
|
|
||||||
var profiles = document.getElementById("profiles");
|
var profiles = document.getElementById("profiles");
|
||||||
while (profiles.hasChildNodes())
|
while (profiles.hasChildNodes())
|
||||||
profiles.removeChild(profiles.firstChild);
|
profiles.firstChild.remove();
|
||||||
|
|
||||||
// Note that this block is still reached even if the user chose 'From File'
|
// Note that this block is still reached even if the user chose 'From File'
|
||||||
// and we canceled the dialog. When that happens, _migrator will be null.
|
// and we canceled the dialog. When that happens, _migrator will be null.
|
||||||
@@ -225,7 +225,7 @@ var MigrationWizard = { /* exported MigrationWizard */
|
|||||||
onImportItemsPageShow() {
|
onImportItemsPageShow() {
|
||||||
var dataSources = document.getElementById("dataSources");
|
var dataSources = document.getElementById("dataSources");
|
||||||
while (dataSources.hasChildNodes())
|
while (dataSources.hasChildNodes())
|
||||||
dataSources.removeChild(dataSources.firstChild);
|
dataSources.firstChild.remove();
|
||||||
|
|
||||||
var items = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
|
var items = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
|
||||||
for (var i = 0; i < 16; ++i) {
|
for (var i = 0; i < 16; ++i) {
|
||||||
@@ -367,7 +367,7 @@ var MigrationWizard = { /* exported MigrationWizard */
|
|||||||
_listItems(aID) {
|
_listItems(aID) {
|
||||||
var items = document.getElementById(aID);
|
var items = document.getElementById(aID);
|
||||||
while (items.hasChildNodes())
|
while (items.hasChildNodes())
|
||||||
items.removeChild(items.firstChild);
|
items.firstChild.remove();
|
||||||
|
|
||||||
var itemID;
|
var itemID;
|
||||||
for (var i = 0; i < 16; ++i) {
|
for (var i = 0; i < 16; ++i) {
|
||||||
|
|||||||
@@ -1011,7 +1011,7 @@ PlacesToolbar.prototype = {
|
|||||||
|
|
||||||
this._openedMenuButton = null;
|
this._openedMenuButton = null;
|
||||||
while (this._rootElt.hasChildNodes()) {
|
while (this._rootElt.hasChildNodes()) {
|
||||||
this._rootElt.removeChild(this._rootElt.firstChild);
|
this._rootElt.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
let cc = this._resultNode.childCount;
|
let cc = this._resultNode.childCount;
|
||||||
@@ -1952,7 +1952,7 @@ PlacesPanelMenuView.prototype = {
|
|||||||
|
|
||||||
// Container is the toolbar itself.
|
// Container is the toolbar itself.
|
||||||
while (this._rootElt.hasChildNodes()) {
|
while (this._rootElt.hasChildNodes()) {
|
||||||
this._rootElt.removeChild(this._rootElt.firstChild);
|
this._rootElt.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < this._resultNode.childCount; ++i) {
|
for (let i = 0; i < this._resultNode.childCount; ++i) {
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ var PlacesOrganizer = {
|
|||||||
|
|
||||||
// Remove existing menu items. Last item is the restoreFromFile item.
|
// Remove existing menu items. Last item is the restoreFromFile item.
|
||||||
while (restorePopup.childNodes.length > 1)
|
while (restorePopup.childNodes.length > 1)
|
||||||
restorePopup.removeChild(restorePopup.firstChild);
|
restorePopup.firstChild.remove();
|
||||||
|
|
||||||
Task.spawn(function* () {
|
Task.spawn(function* () {
|
||||||
let backupFiles = yield PlacesBackups.getBackupFiles();
|
let backupFiles = yield PlacesBackups.getBackupFiles();
|
||||||
@@ -1007,7 +1007,7 @@ var ViewMenu = {
|
|||||||
return endElement;
|
return endElement;
|
||||||
}
|
}
|
||||||
while (popup.hasChildNodes()) {
|
while (popup.hasChildNodes()) {
|
||||||
popup.removeChild(popup.firstChild);
|
popup.firstChild.remove();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ var gBlocklistManager = {
|
|||||||
|
|
||||||
let blocklistsText = document.getElementById("blocklistsText");
|
let blocklistsText = document.getElementById("blocklistsText");
|
||||||
while (blocklistsText.hasChildNodes()) {
|
while (blocklistsText.hasChildNodes()) {
|
||||||
blocklistsText.removeChild(blocklistsText.firstChild);
|
blocklistsText.firstChild.remove();
|
||||||
}
|
}
|
||||||
blocklistsText.appendChild(document.createTextNode(params.introText));
|
blocklistsText.appendChild(document.createTextNode(params.introText));
|
||||||
|
|
||||||
|
|||||||
@@ -557,7 +557,7 @@ var gAdvancedPane = {
|
|||||||
|
|
||||||
var list = document.getElementById("offlineAppsList");
|
var list = document.getElementById("offlineAppsList");
|
||||||
while (list.firstChild) {
|
while (list.firstChild) {
|
||||||
list.removeChild(list.firstChild);
|
list.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
var groups;
|
var groups;
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ var gLanguagesDialog = {
|
|||||||
_buildAvailableLanguageList() {
|
_buildAvailableLanguageList() {
|
||||||
var availableLanguagesPopup = document.getElementById("availableLanguagesPopup");
|
var availableLanguagesPopup = document.getElementById("availableLanguagesPopup");
|
||||||
while (availableLanguagesPopup.hasChildNodes())
|
while (availableLanguagesPopup.hasChildNodes())
|
||||||
availableLanguagesPopup.removeChild(availableLanguagesPopup.firstChild);
|
availableLanguagesPopup.firstChild.remove();
|
||||||
|
|
||||||
// Sort the list of languages by name
|
// Sort the list of languages by name
|
||||||
this._availableLanguagesList.sort(function(a, b) {
|
this._availableLanguagesList.sort(function(a, b) {
|
||||||
@@ -119,7 +119,7 @@ var gLanguagesDialog = {
|
|||||||
|
|
||||||
readAcceptLanguages() {
|
readAcceptLanguages() {
|
||||||
while (this._activeLanguages.hasChildNodes())
|
while (this._activeLanguages.hasChildNodes())
|
||||||
this._activeLanguages.removeChild(this._activeLanguages.firstChild);
|
this._activeLanguages.firstChild.remove();
|
||||||
|
|
||||||
var selectedIndex = 0;
|
var selectedIndex = 0;
|
||||||
var preference = document.getElementById("intl.accept_languages");
|
var preference = document.getElementById("intl.accept_languages");
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ var gPermissionManager = {
|
|||||||
|
|
||||||
var permissionsText = document.getElementById("permissionsText");
|
var permissionsText = document.getElementById("permissionsText");
|
||||||
while (permissionsText.hasChildNodes())
|
while (permissionsText.hasChildNodes())
|
||||||
permissionsText.removeChild(permissionsText.firstChild);
|
permissionsText.firstChild.remove();
|
||||||
permissionsText.appendChild(document.createTextNode(aParams.introText));
|
permissionsText.appendChild(document.createTextNode(aParams.introText));
|
||||||
|
|
||||||
document.title = aParams.windowTitle;
|
document.title = aParams.windowTitle;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ SyncedTabsDeckView.prototype = {
|
|||||||
|
|
||||||
_clearChilden() {
|
_clearChilden() {
|
||||||
while (this.container.firstChild) {
|
while (this.container.firstChild) {
|
||||||
this.container.removeChild(this.container.firstChild);
|
this.container.firstChild.remove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ TabListView.prototype = {
|
|||||||
_clearChilden(node) {
|
_clearChilden(node) {
|
||||||
let parent = node || this.container;
|
let parent = node || this.container;
|
||||||
while (parent.firstChild) {
|
while (parent.firstChild) {
|
||||||
parent.removeChild(parent.firstChild);
|
parent.firstChild.remove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1236,7 +1236,7 @@ this.UITour = {
|
|||||||
// Remove all the children of the notice (rating container
|
// Remove all the children of the notice (rating container
|
||||||
// and the flex).
|
// and the flex).
|
||||||
while (notice.firstChild) {
|
while (notice.firstChild) {
|
||||||
notice.removeChild(notice.firstChild);
|
notice.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that we have a valid URL. If we haven't, do not open the engagement page.
|
// Make sure that we have a valid URL. If we haven't, do not open the engagement page.
|
||||||
|
|||||||
@@ -3898,7 +3898,7 @@ var PDFAttachmentViewer = function PDFAttachmentViewerClosure() {
|
|||||||
this.attachments = null;
|
this.attachments = null;
|
||||||
var container = this.container;
|
var container = this.container;
|
||||||
while (container.firstChild) {
|
while (container.firstChild) {
|
||||||
container.removeChild(container.firstChild);
|
container.firstChild.remove();
|
||||||
}
|
}
|
||||||
if (!keepRenderedCapability) {
|
if (!keepRenderedCapability) {
|
||||||
this._renderedCapability = pdfjsLib.createPromiseCapability();
|
this._renderedCapability = pdfjsLib.createPromiseCapability();
|
||||||
@@ -4598,7 +4598,7 @@ var PDFOutlineViewer = function PDFOutlineViewerClosure() {
|
|||||||
this.lastToggleIsShow = true;
|
this.lastToggleIsShow = true;
|
||||||
var container = this.container;
|
var container = this.container;
|
||||||
while (container.firstChild) {
|
while (container.firstChild) {
|
||||||
container.removeChild(container.firstChild);
|
container.firstChild.remove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_dispatchEvent: function PDFOutlineViewer_dispatchEvent(outlineCount) {
|
_dispatchEvent: function PDFOutlineViewer_dispatchEvent(outlineCount) {
|
||||||
|
|||||||
@@ -36082,7 +36082,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
|
|
||||||
function removeChildren(e) {
|
function removeChildren(e) {
|
||||||
for (var count = e.childNodes.length; count > 0; --count)
|
for (var count = e.childNodes.length; count > 0; --count)
|
||||||
{ e.removeChild(e.firstChild) }
|
{ e.firstChild.remove() }
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -576,7 +576,7 @@ ToolSidebar.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (this._tabbox.tabs && this._tabbox.tabs.hasChildNodes()) {
|
while (this._tabbox.tabs && this._tabbox.tabs.hasChildNodes()) {
|
||||||
this._tabbox.tabs.removeChild(this._tabbox.tabs.firstChild);
|
this._tabbox.tabs.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._currentTool && this._telemetry) {
|
if (this._currentTool && this._telemetry) {
|
||||||
|
|||||||
@@ -1604,7 +1604,7 @@ MarkupView.prototype = {
|
|||||||
// this container will do double duty as the container for the single
|
// this container will do double duty as the container for the single
|
||||||
// text child.
|
// text child.
|
||||||
while (container.children.firstChild) {
|
while (container.children.firstChild) {
|
||||||
container.children.removeChild(container.children.firstChild);
|
container.children.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
container.setInlineTextChild(container.node.inlineTextChild);
|
container.setInlineTextChild(container.node.inlineTextChild);
|
||||||
@@ -1616,7 +1616,7 @@ MarkupView.prototype = {
|
|||||||
|
|
||||||
if (!container.hasChildren) {
|
if (!container.hasChildren) {
|
||||||
while (container.children.firstChild) {
|
while (container.children.firstChild) {
|
||||||
container.children.removeChild(container.children.firstChild);
|
container.children.firstChild.remove();
|
||||||
}
|
}
|
||||||
container.childrenDirty = false;
|
container.childrenDirty = false;
|
||||||
container.setExpanded(false);
|
container.setExpanded(false);
|
||||||
@@ -1659,7 +1659,7 @@ MarkupView.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (container.children.firstChild) {
|
while (container.children.firstChild) {
|
||||||
container.children.removeChild(container.children.firstChild);
|
container.children.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(children.hasFirst && children.hasLast)) {
|
if (!(children.hasFirst && children.hasLast)) {
|
||||||
|
|||||||
@@ -1367,7 +1367,7 @@ var Scratchpad = {
|
|||||||
|
|
||||||
recentFilesMenu.setAttribute("disabled", true);
|
recentFilesMenu.setAttribute("disabled", true);
|
||||||
while (recentFilesPopup.hasChildNodes()) {
|
while (recentFilesPopup.hasChildNodes()) {
|
||||||
recentFilesPopup.removeChild(recentFilesPopup.firstChild);
|
recentFilesPopup.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filePaths.length > 0) {
|
if (filePaths.length > 0) {
|
||||||
|
|||||||
@@ -1019,7 +1019,7 @@ OutputPanel.prototype._update = function () {
|
|||||||
|
|
||||||
// Empty this._div
|
// Empty this._div
|
||||||
while (this._div.hasChildNodes()) {
|
while (this._div.hasChildNodes()) {
|
||||||
this._div.removeChild(this._div.firstChild);
|
this._div.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.displayedOutput.data != null) {
|
if (this.displayedOutput.data != null) {
|
||||||
@@ -1030,7 +1030,7 @@ OutputPanel.prototype._update = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (this._div.hasChildNodes()) {
|
while (this._div.hasChildNodes()) {
|
||||||
this._div.removeChild(this._div.firstChild);
|
this._div.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
let links = node.querySelectorAll("*[href]");
|
let links = node.querySelectorAll("*[href]");
|
||||||
|
|||||||
@@ -1554,7 +1554,7 @@ Cell.prototype = {
|
|||||||
this.label.removeAttribute("value");
|
this.label.removeAttribute("value");
|
||||||
|
|
||||||
while (this.label.firstChild) {
|
while (this.label.firstChild) {
|
||||||
this.label.removeChild(this.label.firstChild);
|
this.label.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.label.appendChild(value);
|
this.label.appendChild(value);
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ Tooltip.prototype = {
|
|||||||
*/
|
*/
|
||||||
empty: function () {
|
empty: function () {
|
||||||
while (this.panel.hasChildNodes()) {
|
while (this.panel.hasChildNodes()) {
|
||||||
this.panel.removeChild(this.panel.firstChild);
|
this.panel.firstChild.remove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -865,7 +865,7 @@ StyleEditorUI.prototype = {
|
|||||||
let list = details.querySelector(".stylesheet-media-list");
|
let list = details.querySelector(".stylesheet-media-list");
|
||||||
|
|
||||||
while (list.firstChild) {
|
while (list.firstChild) {
|
||||||
list.removeChild(list.firstChild);
|
list.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
let rules = editor.mediaRules;
|
let rules = editor.mediaRules;
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ exports.items = [
|
|||||||
onback: () => {
|
onback: () => {
|
||||||
// The back button clears and hides .csscoverage-report
|
// The back button clears and hides .csscoverage-report
|
||||||
while (host.hasChildNodes()) {
|
while (host.hasChildNodes()) {
|
||||||
host.removeChild(host.firstChild);
|
host.firstChild.remove();
|
||||||
}
|
}
|
||||||
host.hidden = true;
|
host.hidden = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ exports.createElement = function(doc, tag) {
|
|||||||
*/
|
*/
|
||||||
exports.clearElement = function(elem) {
|
exports.clearElement = function(elem) {
|
||||||
while (elem.hasChildNodes()) {
|
while (elem.hasChildNodes()) {
|
||||||
elem.removeChild(elem.firstChild);
|
elem.firstChild.remove();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function showpageshowcount()
|
|||||||
var div1 = document.getElementById("div1");
|
var div1 = document.getElementById("div1");
|
||||||
while (div1.firstChild)
|
while (div1.firstChild)
|
||||||
{
|
{
|
||||||
div1.removeChild(div1.firstChild);
|
div1.firstChild.remove();
|
||||||
}
|
}
|
||||||
div1.appendChild(document.createTextNode(
|
div1.appendChild(document.createTextNode(
|
||||||
"pageshowcount: " + pageshowcount));
|
"pageshowcount: " + pageshowcount));
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
function testDone() {
|
function testDone() {
|
||||||
document.body.removeChild(document.body.firstChild);
|
document.body.firstChild.remove();
|
||||||
var isOK = false;
|
var isOK = false;
|
||||||
try {
|
try {
|
||||||
isOK = history.previous != location;
|
isOK = history.previous != location;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=570341
|
|||||||
|
|
||||||
function showSequence(node){
|
function showSequence(node){
|
||||||
while(node.firstChild) {
|
while(node.firstChild) {
|
||||||
node.removeChild(node.firstChild);
|
node.firstChild.remove();
|
||||||
}
|
}
|
||||||
var sequence = [];
|
var sequence = [];
|
||||||
for (var p in moments) {
|
for (var p in moments) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<script>
|
<script>
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
while(root.firstChild) { root.removeChild(root.firstChild); }
|
while(root.firstChild) { root.firstChild.remove(); }
|
||||||
var div = document.createElement("div");
|
var div = document.createElement("div");
|
||||||
root.appendChild(div);
|
root.appendChild(div);
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ function runTest() {
|
|||||||
ok(attrs != null, "Element should have attributes!");
|
ok(attrs != null, "Element should have attributes!");
|
||||||
var attr = testParent.firstChild.getAttributeNode("someattr");
|
var attr = testParent.firstChild.getAttributeNode("someattr");
|
||||||
ok(attr.value == "foo", "The value of the attribute should be 'foo'!");
|
ok(attr.value == "foo", "The value of the attribute should be 'foo'!");
|
||||||
testParent.removeChild(testParent.firstChild);
|
testParent.firstChild.remove();
|
||||||
SpecialPowers.gc();
|
SpecialPowers.gc();
|
||||||
ok(true, "Browser should not crash!")
|
ok(true, "Browser should not crash!")
|
||||||
|
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ function testChildList() {
|
|||||||
m = null;
|
m = null;
|
||||||
});
|
});
|
||||||
m.observe(div, { childList: true});
|
m.observe(div, { childList: true});
|
||||||
div.removeChild(div.firstChild);
|
div.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testChildList2() {
|
function testChildList2() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ function boom()
|
|||||||
{
|
{
|
||||||
var r = document.documentElement;
|
var r = document.documentElement;
|
||||||
while (r.firstChild)
|
while (r.firstChild)
|
||||||
r.removeChild(r.firstChild);
|
r.firstChild.remove();
|
||||||
|
|
||||||
var b = document.createElement("BODY");
|
var b = document.createElement("BODY");
|
||||||
var s = document.createElement("SCRIPT");
|
var s = document.createElement("SCRIPT");
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
while (document.documentElement.firstChild) document.documentElement.removeChild(document.documentElement.firstChild);
|
while (document.documentElement.firstChild) document.documentElement.firstChild.remove();
|
||||||
|
|
||||||
document.addEventListener("DOMSubtreeModified", function(){});
|
document.addEventListener("DOMSubtreeModified", function(){});
|
||||||
document.addEventListener("DOMNodeInsertedIntoDocument", function(){});
|
document.addEventListener("DOMNodeInsertedIntoDocument", function(){});
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ for (var name of elementNames) {
|
|||||||
for (var func of functions) {
|
for (var func of functions) {
|
||||||
// Clean-up.
|
// Clean-up.
|
||||||
while (content.firstChild) {
|
while (content.firstChild) {
|
||||||
content.removeChild(content.firstChild);
|
content.firstChild.remove();
|
||||||
}
|
}
|
||||||
for (form of forms) {
|
for (form of forms) {
|
||||||
content.appendChild(form);
|
content.appendChild(form);
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ valueIs("abcdeTesth",
|
|||||||
"Modifying textnode text shouldn't affect value in edited textarea");
|
"Modifying textnode text shouldn't affect value in edited textarea");
|
||||||
defValueIs("abcdefghlmno", "Modified textnode text 3");
|
defValueIs("abcdefghlmno", "Modified textnode text 3");
|
||||||
|
|
||||||
t.removeChild(t.firstChild);
|
t.firstChild.remove();
|
||||||
valueIs("abcdeTesth",
|
valueIs("abcdeTesth",
|
||||||
"Removing child textnode shouldn't affect value in edited textarea");
|
"Removing child textnode shouldn't affect value in edited textarea");
|
||||||
defValueIs("defghlmno", "Removed textnode 3");
|
defValueIs("defghlmno", "Removed textnode 3");
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=311681
|
|||||||
|
|
||||||
function clear(node) {
|
function clear(node) {
|
||||||
while (node.hasChildNodes()) {
|
while (node.hasChildNodes()) {
|
||||||
node.removeChild(node.firstChild);
|
node.firstChild.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=311681
|
|||||||
|
|
||||||
function clear(node) {
|
function clear(node) {
|
||||||
while (node.hasChildNodes()) {
|
while (node.hasChildNodes()) {
|
||||||
node.removeChild(node.firstChild);
|
node.firstChild.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function remove() {
|
|||||||
var stage = document.getElementById("stage");
|
var stage = document.getElementById("stage");
|
||||||
var body = document.getElementsByTagName("BODY")[0];
|
var body = document.getElementsByTagName("BODY")[0];
|
||||||
while (stage.firstChild) {
|
while (stage.firstChild) {
|
||||||
stage.removeChild(stage.firstChild);
|
stage.firstChild.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1545,7 +1545,7 @@ function removeNodeAndSource(n) {
|
|||||||
n.srcObject = null;
|
n.srcObject = null;
|
||||||
n.src = "";
|
n.src = "";
|
||||||
while (n.firstChild) {
|
while (n.firstChild) {
|
||||||
n.removeChild(n.firstChild);
|
n.firstChild.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -889,7 +889,7 @@ Cu.import('resource://gre/modules/Services.jsm');
|
|||||||
|
|
||||||
// Remove all previous children.
|
// Remove all previous children.
|
||||||
while (overlay.firstChild) {
|
while (overlay.firstChild) {
|
||||||
overlay.removeChild(overlay.firstChild);
|
overlay.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
var controlBar;
|
var controlBar;
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ function testCurrentColorChange()
|
|||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
gCircle.removeAttribute("color");
|
gCircle.removeAttribute("color");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testCurrentColorChangeUsingStyle()
|
function testCurrentColorChangeUsingStyle()
|
||||||
@@ -209,7 +209,7 @@ function testCurrentColorChangeUsingStyle()
|
|||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
gCircle.removeAttribute("style");
|
gCircle.removeAttribute("style");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFallbackColor(pServerStr)
|
function getFallbackColor(pServerStr)
|
||||||
@@ -236,7 +236,7 @@ function testCurrentColorChangeOnFallback()
|
|||||||
"Checking animated fallback fill=currentColor after updating context");
|
"Checking animated fallback fill=currentColor after updating context");
|
||||||
|
|
||||||
gCircle.removeAttribute("style");
|
gCircle.removeAttribute("style");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testInheritChange()
|
function testInheritChange()
|
||||||
@@ -255,7 +255,7 @@ function testInheritChange()
|
|||||||
"Checking animated fill=inherit after updating context");
|
"Checking animated fill=inherit after updating context");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("fill");
|
gCircleParent.removeAttribute("fill");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testInheritChangeUsingStyle()
|
function testInheritChangeUsingStyle()
|
||||||
@@ -275,7 +275,7 @@ function testInheritChangeUsingStyle()
|
|||||||
+ "(using style attr)");
|
+ "(using style attr)");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("style");
|
gCircleParent.removeAttribute("style");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testEmUnitChangeOnProp()
|
function testEmUnitChangeOnProp()
|
||||||
@@ -294,7 +294,7 @@ function testEmUnitChangeOnProp()
|
|||||||
"Checking animated font-size=2em after updating context");
|
"Checking animated font-size=2em after updating context");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("font-size");
|
gCircleParent.removeAttribute("font-size");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testEmUnitChangeOnPropBase()
|
function testEmUnitChangeOnPropBase()
|
||||||
@@ -319,7 +319,7 @@ function testEmUnitChangeOnPropBase()
|
|||||||
"Checking animated font-size=30px after updating context");
|
"Checking animated font-size=30px after updating context");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("font-size");
|
gCircleParent.removeAttribute("font-size");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testEmUnitChangeOnLength()
|
function testEmUnitChangeOnLength()
|
||||||
@@ -344,7 +344,7 @@ function testEmUnitChangeOnLength()
|
|||||||
"resampling");
|
"resampling");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("font-size");
|
gCircleParent.removeAttribute("font-size");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testPercentUnitChangeOnProp()
|
function testPercentUnitChangeOnProp()
|
||||||
@@ -363,7 +363,7 @@ function testPercentUnitChangeOnProp()
|
|||||||
"Checking animated font-size=150% after updating context");
|
"Checking animated font-size=150% after updating context");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("font-size");
|
gCircleParent.removeAttribute("font-size");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testPercentUnitChangeOnLength()
|
function testPercentUnitChangeOnLength()
|
||||||
@@ -399,7 +399,7 @@ function testPercentUnitChangeOnLength()
|
|||||||
"Checking animated length=100% after updating context");
|
"Checking animated length=100% after updating context");
|
||||||
|
|
||||||
gSvg.setAttribute("height", oldHeight);
|
gSvg.setAttribute("height", oldHeight);
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRelativeFontSize()
|
function testRelativeFontSize()
|
||||||
@@ -421,7 +421,7 @@ function testRelativeFontSize()
|
|||||||
ok(fsize > 20, "Checking animated font-size > 20px after updating context");
|
ok(fsize > 20, "Checking animated font-size > 20px after updating context");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("font-size");
|
gCircleParent.removeAttribute("font-size");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRelativeFontWeight()
|
function testRelativeFontWeight()
|
||||||
@@ -447,7 +447,7 @@ function testRelativeFontWeight()
|
|||||||
"Checking animated font-weight = 900 after updating context");
|
"Checking animated font-weight = 900 after updating context");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("font-weight");
|
gCircleParent.removeAttribute("font-weight");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRelativeFont()
|
function testRelativeFont()
|
||||||
@@ -479,7 +479,7 @@ function testRelativeFont()
|
|||||||
"Checking size of shorthand 'font' > 20px after updating context");
|
"Checking size of shorthand 'font' > 20px after updating context");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("font-size");
|
gCircleParent.removeAttribute("font-size");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testCalcFontSize()
|
function testCalcFontSize()
|
||||||
@@ -500,7 +500,7 @@ function testCalcFontSize()
|
|||||||
"context");
|
"context");
|
||||||
|
|
||||||
gCircleParent.removeAttribute("font-size");
|
gCircleParent.removeAttribute("font-size");
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDashArray()
|
function testDashArray()
|
||||||
@@ -529,7 +529,7 @@ function testDashArray()
|
|||||||
|
|
||||||
gSvg.setAttribute("height", oldHeight);
|
gSvg.setAttribute("height", oldHeight);
|
||||||
gSvg.setAttribute("width", oldWidth);
|
gSvg.setAttribute("width", oldWidth);
|
||||||
gCircle.removeChild(gCircle.firstChild);
|
gCircle.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testClip()
|
function testClip()
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ function runAdditionTestCase(test, elem, svg)
|
|||||||
// We assume the only children of elem are the animation elements we've just
|
// We assume the only children of elem are the animation elements we've just
|
||||||
// added.
|
// added.
|
||||||
while (elem.firstChild) {
|
while (elem.firstChild) {
|
||||||
elem.removeChild(elem.firstChild);
|
elem.firstChild.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ function runTest() {
|
|||||||
|
|
||||||
// Dirty the frames.
|
// Dirty the frames.
|
||||||
document.getElementById("display").style.width = "700px";
|
document.getElementById("display").style.width = "700px";
|
||||||
svgText.removeChild(svgText.firstChild);
|
svgText.firstChild.remove();
|
||||||
|
|
||||||
// Paint without flushing layout. If the test fails, we'll trigger
|
// Paint without flushing layout. If the test fails, we'll trigger
|
||||||
// an assertion.
|
// an assertion.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ok(length > 0, "text.getComputedTextLength() > 0");
|
|||||||
text.firstChild.nodeValue += "cd";
|
text.firstChild.nodeValue += "cd";
|
||||||
ok(text.getComputedTextLength() > length, "text.getComputedTextLength() changes directly after DOM mutation");
|
ok(text.getComputedTextLength() > length, "text.getComputedTextLength() changes directly after DOM mutation");
|
||||||
|
|
||||||
text.removeChild(text.firstChild);
|
text.firstChild.remove();
|
||||||
is(text.getComputedTextLength(), 0, "text.getComputedTextLength() == 0 after removing child");
|
is(text.getComputedTextLength(), 0, "text.getComputedTextLength() == 0 after removing child");
|
||||||
</script>
|
</script>
|
||||||
</pre>
|
</pre>
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ ok(firstDistNodes[0].id == "one" &&
|
|||||||
firstDistNodes[3].id == "four", "Reprojection through shadow should preserve node order.");
|
firstDistNodes[3].id == "four", "Reprojection through shadow should preserve node order.");
|
||||||
|
|
||||||
// Remove a node from the host and make sure that it is removed from all insertion points.
|
// Remove a node from the host and make sure that it is removed from all insertion points.
|
||||||
host.removeChild(host.firstChild);
|
host.firstChild.remove();
|
||||||
firstDistNodes = firstContent.getDistributedNodes();
|
firstDistNodes = firstContent.getDistributedNodes();
|
||||||
secondDistNodes = secondContent.getDistributedNodes();
|
secondDistNodes = secondContent.getDistributedNodes();
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ firstShadow.appendChild(shadowChild);
|
|||||||
is(firstContent.getDistributedNodes()[0], shadowChild, "Elements in shadow insertioin point should be projected into content insertion points.");
|
is(firstContent.getDistributedNodes()[0], shadowChild, "Elements in shadow insertioin point should be projected into content insertion points.");
|
||||||
|
|
||||||
// Remove child of ShadowRoot and check that projected node is removed from insertion point.
|
// Remove child of ShadowRoot and check that projected node is removed from insertion point.
|
||||||
firstShadow.removeChild(firstShadow.firstChild);
|
firstShadow.firstChild.remove();
|
||||||
|
|
||||||
is(firstContent.getDistributedNodes().length, 0, "Reprojected element was removed from ShadowRoot, thus it should be removed from content insertion point.");
|
is(firstContent.getDistributedNodes().length, 0, "Reprojected element was removed from ShadowRoot, thus it should be removed from content insertion point.");
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ host.innerHTML = '<span></span>';
|
|||||||
is(firstContent.getDistributedNodes()[0], host.firstChild, "Child of host should be projected to insertion point.");
|
is(firstContent.getDistributedNodes()[0], host.firstChild, "Child of host should be projected to insertion point.");
|
||||||
|
|
||||||
// Remove node and make sure that it is removed from distributed nodes.
|
// Remove node and make sure that it is removed from distributed nodes.
|
||||||
host.removeChild(host.firstChild);
|
host.firstChild.remove();
|
||||||
|
|
||||||
is(firstContent.getDistributedNodes().length, 0, "Node removed from host should be removed from insertion point.");
|
is(firstContent.getDistributedNodes().length, 0, "Node removed from host should be removed from insertion point.");
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=319374
|
|||||||
while (res = result.iterateNext()) {
|
while (res = result.iterateNext()) {
|
||||||
++counter;
|
++counter;
|
||||||
var anon = getAnonymousNodes(res);
|
var anon = getAnonymousNodes(res);
|
||||||
anon[0].removeChild(anon[0].firstChild); // Removing a child node
|
anon[0].firstChild.remove(); // Removing a child node
|
||||||
anon[0].removeAttribute("attr1"); // Removing an attribute
|
anon[0].removeAttribute("attr1"); // Removing an attribute
|
||||||
anon[1].firstChild.data = "anon text changed" // Modifying text data
|
anon[1].firstChild.data = "anon text changed" // Modifying text data
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ function doTests()
|
|||||||
is(actual, test[2], "sorted step " + (t + 1));
|
is(actual, test[2], "sorted step " + (t + 1));
|
||||||
|
|
||||||
while(box.hasChildNodes())
|
while(box.hasChildNodes())
|
||||||
box.removeChild(box.firstChild);
|
box.firstChild.remove();
|
||||||
box.removeAttribute("sortDirection");
|
box.removeAttribute("sortDirection");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=311681
|
|||||||
|
|
||||||
function clear(node) {
|
function clear(node) {
|
||||||
while (node.hasChildNodes()) {
|
while (node.hasChildNodes()) {
|
||||||
node.removeChild(node.firstChild);
|
node.firstChild.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function boom()
|
|||||||
{
|
{
|
||||||
var r = document.documentElement;
|
var r = document.documentElement;
|
||||||
while(r.firstChild)
|
while(r.firstChild)
|
||||||
r.removeChild(r.firstChild);
|
r.firstChild.remove();
|
||||||
|
|
||||||
document.execCommand("contentReadOnly", false, "");
|
document.execCommand("contentReadOnly", false, "");
|
||||||
document.documentElement.focus();
|
document.documentElement.focus();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
addEventListener('DOMContentLoaded', function() {
|
addEventListener('DOMContentLoaded', function() {
|
||||||
let root = document.documentElement;
|
let root = document.documentElement;
|
||||||
while(root.firstChild) {
|
while(root.firstChild) {
|
||||||
root.removeChild(root.firstChild);
|
root.firstChild.remove();
|
||||||
}
|
}
|
||||||
document.designMode = 'on';
|
document.designMode = 'on';
|
||||||
document.removeChild(document.documentElement);
|
document.removeChild(document.documentElement);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
addEventListener("DOMContentLoaded", function(){
|
addEventListener("DOMContentLoaded", function(){
|
||||||
let root = document.documentElement;
|
let root = document.documentElement;
|
||||||
while(root.firstChild) {
|
while(root.firstChild) {
|
||||||
root.removeChild(root.firstChild);
|
root.firstChild.remove();
|
||||||
}
|
}
|
||||||
let o_0 = document.createElement("body");
|
let o_0 = document.createElement("body");
|
||||||
root.appendChild(o_0);
|
root.appendChild(o_0);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
doc.body.appendChild(doc.createTextNode("foo"));
|
doc.body.appendChild(doc.createTextNode("foo"));
|
||||||
doc.designMode = "on";
|
doc.designMode = "on";
|
||||||
while (doc.body.firstChild) {
|
while (doc.body.firstChild) {
|
||||||
doc.body.removeChild(doc.body.firstChild);
|
doc.body.firstChild.remove();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
while (document.documentElement.firstChild) {
|
while (document.documentElement.firstChild) {
|
||||||
document.documentElement.removeChild(document.documentElement.firstChild);
|
document.documentElement.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
var td = document.createElementNS("http://www.w3.org/1999/xhtml", "td");
|
var td = document.createElementNS("http://www.w3.org/1999/xhtml", "td");
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
function boom() {
|
function boom() {
|
||||||
var r = document.documentElement;
|
var r = document.documentElement;
|
||||||
while (r.firstChild) {
|
while (r.firstChild) {
|
||||||
r.removeChild(r.firstChild);
|
r.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
document.documentElement.contentEditable = "true";
|
document.documentElement.contentEditable = "true";
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function boom()
|
|||||||
{
|
{
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
while (root.firstChild) {
|
while (root.firstChild) {
|
||||||
root.removeChild(root.firstChild);
|
root.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
var space = document.createTextNode(" ");
|
var space = document.createTextNode(" ");
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
while (root.firstChild) { root.removeChild(root.firstChild); }
|
while (root.firstChild) { root.firstChild.remove(); }
|
||||||
root.contentEditable = "true";
|
root.contentEditable = "true";
|
||||||
document.removeChild(root);
|
document.removeChild(root);
|
||||||
document.appendChild(root);
|
document.appendChild(root);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function boom()
|
|||||||
{
|
{
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
|
|
||||||
while (root.firstChild) { root.removeChild(root.firstChild); }
|
while (root.firstChild) { root.firstChild.remove(); }
|
||||||
|
|
||||||
var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
|
var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
|
||||||
var div = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
|
var div = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
while(root.firstChild) { root.removeChild(root.firstChild); }
|
while(root.firstChild) { root.firstChild.remove(); }
|
||||||
var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
|
var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
|
||||||
body.setAttributeNS(null, "contenteditable", "true");
|
body.setAttributeNS(null, "contenteditable", "true");
|
||||||
var img = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
|
var img = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
|
||||||
|
|||||||
@@ -2109,7 +2109,7 @@ goog.dom.createTable_ = function(doc, rows, columns, fillWithNbsp) {
|
|||||||
totalHtml.push("</table>");
|
totalHtml.push("</table>");
|
||||||
var elem = doc.createElement(goog.dom.TagName.DIV);
|
var elem = doc.createElement(goog.dom.TagName.DIV);
|
||||||
elem.innerHTML = totalHtml.join("");
|
elem.innerHTML = totalHtml.join("");
|
||||||
return elem.removeChild(elem.firstChild)
|
return elem.firstChild.remove()
|
||||||
};
|
};
|
||||||
goog.dom.htmlToDocumentFragment = function(htmlString) {
|
goog.dom.htmlToDocumentFragment = function(htmlString) {
|
||||||
return goog.dom.htmlToDocumentFragment_(document, htmlString)
|
return goog.dom.htmlToDocumentFragment_(document, htmlString)
|
||||||
@@ -2118,12 +2118,12 @@ goog.dom.htmlToDocumentFragment_ = function(doc, htmlString) {
|
|||||||
var tempDiv = doc.createElement("div");
|
var tempDiv = doc.createElement("div");
|
||||||
if(goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT) {
|
if(goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT) {
|
||||||
tempDiv.innerHTML = "<br>" + htmlString;
|
tempDiv.innerHTML = "<br>" + htmlString;
|
||||||
tempDiv.removeChild(tempDiv.firstChild)
|
tempDiv.firstChild.remove()
|
||||||
}else {
|
}else {
|
||||||
tempDiv.innerHTML = htmlString
|
tempDiv.innerHTML = htmlString
|
||||||
}
|
}
|
||||||
if(tempDiv.childNodes.length == 1) {
|
if(tempDiv.childNodes.length == 1) {
|
||||||
return tempDiv.removeChild(tempDiv.firstChild)
|
return tempDiv.firstChild.remove()
|
||||||
}else {
|
}else {
|
||||||
var fragment = doc.createDocumentFragment();
|
var fragment = doc.createDocumentFragment();
|
||||||
while(tempDiv.firstChild) {
|
while(tempDiv.firstChild) {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function boom()
|
|||||||
{
|
{
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
while(root.firstChild) {
|
while(root.firstChild) {
|
||||||
root.removeChild(root.firstChild);
|
root.firstChild.remove();
|
||||||
}
|
}
|
||||||
root.appendChild(document.createTextNode("Mozilla"));
|
root.appendChild(document.createTextNode("Mozilla"));
|
||||||
root.focus();
|
root.focus();
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ SimpleTest.waitForFocus(function() {
|
|||||||
var beforeB = snapshotWindow(win, true);
|
var beforeB = snapshotWindow(win, true);
|
||||||
is(b.textContent, "X", "Typing should work");
|
is(b.textContent, "X", "Typing should work");
|
||||||
while (b.firstChild) {
|
while (b.firstChild) {
|
||||||
b.removeChild(b.firstChild);
|
b.firstChild.remove();
|
||||||
}
|
}
|
||||||
ok(editorCommandsEnabled(), "The editor commands should work");
|
ok(editorCommandsEnabled(), "The editor commands should work");
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ SimpleTest.waitForFocus(function() {
|
|||||||
var afterB = snapshotWindow(win, true);
|
var afterB = snapshotWindow(win, true);
|
||||||
is(b.textContent, "X", "Typing should work");
|
is(b.textContent, "X", "Typing should work");
|
||||||
while (b.firstChild) {
|
while (b.firstChild) {
|
||||||
b.removeChild(b.firstChild);
|
b.firstChild.remove();
|
||||||
}
|
}
|
||||||
ok(editorCommandsEnabled(), "The editor commands should work");
|
ok(editorCommandsEnabled(), "The editor commands should work");
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
function doTest()
|
function doTest()
|
||||||
{
|
{
|
||||||
var r = document.documentElement;
|
var r = document.documentElement;
|
||||||
while(r.firstChild) { r.removeChild(r.firstChild); }
|
while(r.firstChild) { r.firstChild.remove(); }
|
||||||
var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
|
var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
|
||||||
r.appendChild(body);
|
r.appendChild(body);
|
||||||
body.contentEditable = "true";
|
body.contentEditable = "true";
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
document.body.offsetWidth;
|
document.body.offsetWidth;
|
||||||
var div = document.getElementById("x");
|
var div = document.getElementById("x");
|
||||||
div.id = "y";
|
div.id = "y";
|
||||||
div.removeChild(div.firstChild);
|
div.firstChild.remove();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var z = document.getElementById("z");
|
var z = document.getElementById("z");
|
||||||
z.removeChild(z.firstChild);
|
z.firstChild.remove();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function boom()
|
|||||||
++i;
|
++i;
|
||||||
|
|
||||||
while (document.body.firstChild)
|
while (document.body.firstChild)
|
||||||
document.body.removeChild(document.body.firstChild);
|
document.body.firstChild.remove();
|
||||||
|
|
||||||
var table = document.createElement("table");
|
var table = document.createElement("table");
|
||||||
document.body.appendChild(table);
|
document.body.appendChild(table);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ function boom()
|
|||||||
var legend = document.getElementById("legend");
|
var legend = document.getElementById("legend");
|
||||||
legend.appendChild(document.createTextNode("T"));
|
legend.appendChild(document.createTextNode("T"));
|
||||||
document.documentElement.offsetHeight;
|
document.documentElement.offsetHeight;
|
||||||
legend.removeChild(legend.firstChild);
|
legend.firstChild.remove();
|
||||||
document.body.removeChild(legend);
|
document.body.removeChild(legend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ div { -moz-column-count: 2; width: 0; }
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var v = document.getElementById("v");
|
var v = document.getElementById("v");
|
||||||
v.removeChild(v.firstChild);
|
v.firstChild.remove();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ function bounceDE()
|
|||||||
|
|
||||||
function clearChildren(root)
|
function clearChildren(root)
|
||||||
{
|
{
|
||||||
while(root.firstChild) { root.removeChild(root.firstChild); }
|
while(root.firstChild) { root.firstChild.remove(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ div:first-letter { float: right; }
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var d = document.getElementById('d');
|
var d = document.getElementById('d');
|
||||||
d.removeChild(d.firstChild);
|
d.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ body:first-letter { float: right; }
|
|||||||
|
|
||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
document.body.removeChild(document.body.firstChild);
|
document.body.firstChild.remove();
|
||||||
document.body.appendChild(document.createTextNode('x'));
|
document.body.appendChild(document.createTextNode('x'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function boom() {
|
function boom() {
|
||||||
document.body.removeChild(document.body.firstChild);
|
document.body.firstChild.remove();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ div { height: 1px; }
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.removeChild(a.firstChild);
|
a.firstChild.remove();
|
||||||
document.documentElement.style.outline = "none";
|
document.documentElement.style.outline = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function boom()
|
|||||||
v.childNodes[1].firstChild.data = "";
|
v.childNodes[1].firstChild.data = "";
|
||||||
document.documentElement.offsetHeight;
|
document.documentElement.offsetHeight;
|
||||||
v.appendChild(document.createTextNode("D"));
|
v.appendChild(document.createTextNode("D"));
|
||||||
v.removeChild(v.firstChild);
|
v.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
while (document.documentElement.firstChild)
|
while (document.documentElement.firstChild)
|
||||||
document.documentElement.removeChild(document.documentElement.firstChild);
|
document.documentElement.firstChild.remove();
|
||||||
document.documentElement.contentEditable = "true";
|
document.documentElement.contentEditable = "true";
|
||||||
document.execCommand("strikethrough", false, null);
|
document.execCommand("strikethrough", false, null);
|
||||||
try { document.execCommand("justifyfull", false, null); } catch(e) { }
|
try { document.execCommand("justifyfull", false, null); } catch(e) { }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ function boom()
|
|||||||
var r = document.documentElement;
|
var r = document.documentElement;
|
||||||
|
|
||||||
while (r.firstChild)
|
while (r.firstChild)
|
||||||
r.removeChild(r.firstChild);
|
r.firstChild.remove();
|
||||||
|
|
||||||
var a = document.createTextNode("a");
|
var a = document.createTextNode("a");
|
||||||
r.appendChild(a);
|
r.appendChild(a);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function boom()
|
|||||||
document.documentElement.offsetHeight;
|
document.documentElement.offsetHeight;
|
||||||
var s = document.getElementById("s");
|
var s = document.getElementById("s");
|
||||||
|
|
||||||
s.removeChild(s.firstChild);
|
s.firstChild.remove();
|
||||||
|
|
||||||
document.documentElement.offsetHeight;
|
document.documentElement.offsetHeight;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
while(root.firstChild) { root.removeChild(root.firstChild); }
|
while(root.firstChild) { root.firstChild.remove(); }
|
||||||
root.appendChild(document.createElement("body"));
|
root.appendChild(document.createElement("body"));
|
||||||
root.offsetHeight;
|
root.offsetHeight;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function boom()
|
|||||||
|
|
||||||
// A dynamic change
|
// A dynamic change
|
||||||
var x = document.getElementById("x");
|
var x = document.getElementById("x");
|
||||||
x.removeChild(x.firstChild);
|
x.firstChild.remove();
|
||||||
x.appendChild(document.createTextNode("\n\n\n"));
|
x.appendChild(document.createTextNode("\n\n\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<script>
|
<script>
|
||||||
function loaded() {
|
function loaded() {
|
||||||
var f = document.getElementById("x");
|
var f = document.getElementById("x");
|
||||||
f.removeChild(f.firstChild);
|
f.firstChild.remove();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ function bounce()
|
|||||||
var docElemChildren = [];
|
var docElemChildren = [];
|
||||||
while (docElem.firstChild) {
|
while (docElem.firstChild) {
|
||||||
docElemChildren.push(docElem.firstChild);
|
docElemChildren.push(docElem.firstChild);
|
||||||
docElem.removeChild(docElem.firstChild);
|
docElem.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < docElemChildren.length; ++i)
|
for (var i = 0; i < docElemChildren.length; ++i)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var n = document.getElementById("editMe");
|
var n = document.getElementById("editMe");
|
||||||
n.removeChild(n.firstChild);
|
n.firstChild.remove();
|
||||||
document.documentElement.className = "";
|
document.documentElement.className = "";
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.removeChild(a.firstChild);
|
a.firstChild.remove();
|
||||||
document.documentElement.className = "";
|
document.documentElement.className = "";
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
function boom()
|
function boom()
|
||||||
{
|
{
|
||||||
var a = document.getElementById("a");
|
var a = document.getElementById("a");
|
||||||
a.removeChild(a.firstChild);
|
a.firstChild.remove();
|
||||||
document.documentElement.className = "";
|
document.documentElement.className = "";
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ l.textContent = "#1";
|
|||||||
fs1.insertBefore(l, fs1.firstChild);
|
fs1.insertBefore(l, fs1.firstChild);
|
||||||
|
|
||||||
var fs2 = document.getElementById("fs2");
|
var fs2 = document.getElementById("fs2");
|
||||||
fs2.removeChild(fs2.firstChild);
|
fs2.firstChild.remove();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function boom()
|
|||||||
document.getElementById("div").style.MozBinding = "url('#foo')";
|
document.getElementById("div").style.MozBinding = "url('#foo')";
|
||||||
|
|
||||||
var opt1 = document.getElementById("opt1");
|
var opt1 = document.getElementById("opt1");
|
||||||
opt1.removeChild(opt1.firstChild);
|
opt1.firstChild.remove();
|
||||||
|
|
||||||
document.getElementById("textarea").value += " y";
|
document.getElementById("textarea").value += " y";
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
function doMore(data) {
|
function doMore(data) {
|
||||||
while(data.hasChildNodes())
|
while(data.hasChildNodes())
|
||||||
data.removeChild(data.firstChild);
|
data.firstChild.remove();
|
||||||
for (var i = 0; i < 10; i++) {
|
for (var i = 0; i < 10; i++) {
|
||||||
append(data);
|
append(data);
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user