зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws.
This commit is contained in:
Родитель
7cfff94991
Коммит
9d62681259
|
@ -392,7 +392,7 @@ function* testSubtreeRule(browser, target, rule, expected) {
|
|||
yield ContentTask.spawn(browser, target.id, id => {
|
||||
let elm = content.document.getElementById(id);
|
||||
while (elm.firstChild) {
|
||||
elm.removeChild(elm.firstChild);
|
||||
elm.firstChild.remove();
|
||||
}
|
||||
});
|
||||
yield updateAccessibleIfNeeded(onEvent, target);
|
||||
|
|
|
@ -157,7 +157,7 @@ addAccessibleTask(`
|
|||
yield ContentTask.spawn(browser, {}, () => {
|
||||
// Remove HTML element.
|
||||
let docNode = content.document.getElementById('iframe').contentDocument;
|
||||
docNode.removeChild(docNode.firstChild);
|
||||
docNode.firstChild.remove();
|
||||
});
|
||||
let event = yield reorderEventPromise;
|
||||
|
||||
|
@ -235,7 +235,7 @@ addAccessibleTask(`
|
|||
let docEl =
|
||||
content.document.getElementById('iframe').contentDocument.documentElement;
|
||||
// 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.
|
||||
yield reorderEventPromise;
|
||||
|
|
|
@ -56,7 +56,7 @@ addAccessibleTask('<select id="select"></select>', function*(browser, accDoc) {
|
|||
// Remove grouping from combobox
|
||||
yield ContentTask.spawn(browser, {}, () => {
|
||||
let contentSelect = content.document.getElementById('select');
|
||||
contentSelect.removeChild(contentSelect.firstChild);
|
||||
contentSelect.firstChild.remove();
|
||||
});
|
||||
yield onEvent;
|
||||
|
||||
|
|
|
@ -414,8 +414,8 @@
|
|||
var l1 = doc.firstChild;
|
||||
this.target = l1.firstChild;
|
||||
var l2 = doc.lastChild;
|
||||
l1.DOMNode.removeChild(l1.DOMNode.firstChild);
|
||||
l2.DOMNode.removeChild(l2.DOMNode.firstChild);
|
||||
l1.DOMNode.firstChild.remove();
|
||||
l2.DOMNode.firstChild.remove();
|
||||
}
|
||||
|
||||
this.check = function hideHideNDestroyDoc_check()
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
this.invoke = function removeChildSpan_invoke()
|
||||
{
|
||||
// remove HTML span, a first child of the node
|
||||
this.DOMNode.removeChild(this.DOMNode.firstChild);
|
||||
this.DOMNode.firstChild.remove();
|
||||
}
|
||||
|
||||
this.getID = function removeChildSpan_getID()
|
||||
|
@ -162,7 +162,7 @@
|
|||
this.DOMNode.removeChild(this.DOMNode.lastChild);
|
||||
} else {
|
||||
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);
|
||||
|
||||
while (aElm.firstChild)
|
||||
aElm.removeChild(aElm.firstChild);
|
||||
aElm.firstChild.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -266,7 +266,7 @@
|
|||
|
||||
// Remove HTML element.
|
||||
var docNode = getDocNode(aID);
|
||||
docNode.removeChild(docNode.firstChild);
|
||||
docNode.firstChild.remove();
|
||||
}
|
||||
|
||||
this.getID = function removeHTMLFromIFrameDoc_getID()
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
this.invoke = function removeRemove_invoke()
|
||||
{
|
||||
getNode(aContainer).removeChild(getNode(aContainer).firstChild);
|
||||
getNode(aContainer).firstChild.remove();
|
||||
}
|
||||
|
||||
this.finalCheck = function removeRemove_finalCheck()
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
this.invoke = function removeOptGroup_invoke()
|
||||
{
|
||||
this.option1Node = this.selectNode.firstChild.firstChild;
|
||||
this.selectNode.removeChild(this.selectNode.firstChild);
|
||||
this.selectNode.firstChild.remove();
|
||||
}
|
||||
|
||||
this.eventSeq = [
|
||||
|
|
|
@ -241,7 +241,7 @@ var ctrlTab = {
|
|||
aPreview._tab = aTab;
|
||||
|
||||
if (aPreview.firstChild)
|
||||
aPreview.removeChild(aPreview.firstChild);
|
||||
aPreview.firstChild.remove();
|
||||
if (aTab) {
|
||||
let canvasWidth = this.canvasWidth;
|
||||
let canvasHeight = this.canvasHeight;
|
||||
|
|
|
@ -330,7 +330,7 @@ var gFxAccounts = {
|
|||
populateSendTabToDevicesMenu(devicesPopup, url, title) {
|
||||
// remove existing menu items
|
||||
while (devicesPopup.hasChildNodes()) {
|
||||
devicesPopup.removeChild(devicesPopup.firstChild);
|
||||
devicesPopup.firstChild.remove();
|
||||
}
|
||||
|
||||
const fragment = document.createDocumentFragment();
|
||||
|
|
|
@ -746,7 +746,7 @@ HistoryMenu.prototype = {
|
|||
|
||||
// remove existing menu items
|
||||
while (undoPopup.hasChildNodes())
|
||||
undoPopup.removeChild(undoPopup.firstChild);
|
||||
undoPopup.firstChild.remove();
|
||||
|
||||
// no restorable tabs, so make sure menu is disabled, and return
|
||||
if (this._getClosedTabCount() == 0) {
|
||||
|
@ -782,7 +782,7 @@ HistoryMenu.prototype = {
|
|||
|
||||
// remove existing menu items
|
||||
while (undoPopup.hasChildNodes())
|
||||
undoPopup.removeChild(undoPopup.firstChild);
|
||||
undoPopup.firstChild.remove();
|
||||
|
||||
// no restorable windows, so make sure menu is disabled, and return
|
||||
if (SessionStore.getClosedWindowCount() == 0) {
|
||||
|
|
|
@ -418,7 +418,7 @@ function resetPageInfo(args) {
|
|||
/* Reset Feeds Tab */
|
||||
var feedListbox = document.getElementById("feedListbox");
|
||||
while (feedListbox.firstChild)
|
||||
feedListbox.removeChild(feedListbox.firstChild);
|
||||
feedListbox.firstChild.remove();
|
||||
|
||||
/* Call registered overlay reset functions */
|
||||
onResetRegistry.forEach(function(func) { func(); });
|
||||
|
|
|
@ -306,7 +306,7 @@ function setText(id, value) {
|
|||
element.value = value;
|
||||
else {
|
||||
if (element.hasChildNodes())
|
||||
element.removeChild(element.firstChild);
|
||||
element.firstChild.remove();
|
||||
var textNode = document.createTextNode(value);
|
||||
element.appendChild(textNode);
|
||||
}
|
||||
|
|
|
@ -490,7 +490,7 @@ function createUserContextMenu(event, {
|
|||
useAccessKeys = true
|
||||
} = {}) {
|
||||
while (event.target.hasChildNodes()) {
|
||||
event.target.removeChild(event.target.firstChild);
|
||||
event.target.firstChild.remove();
|
||||
}
|
||||
|
||||
let bundle = document.getElementById("bundle_browser");
|
||||
|
|
|
@ -244,12 +244,12 @@ const CustomizableWidgets = [
|
|||
|
||||
let recentlyClosedTabs = doc.getElementById("PanelUI-recentlyClosedTabs");
|
||||
while (recentlyClosedTabs.firstChild) {
|
||||
recentlyClosedTabs.removeChild(recentlyClosedTabs.firstChild);
|
||||
recentlyClosedTabs.firstChild.remove();
|
||||
}
|
||||
|
||||
let recentlyClosedWindows = doc.getElementById("PanelUI-recentlyClosedWindows");
|
||||
while (recentlyClosedWindows.firstChild) {
|
||||
recentlyClosedWindows.removeChild(recentlyClosedWindows.firstChild);
|
||||
recentlyClosedWindows.firstChild.remove();
|
||||
}
|
||||
|
||||
let utils = RecentlyClosedTabsAndWindowsMenuUtils;
|
||||
|
|
|
@ -492,7 +492,7 @@ const PanelUI = {
|
|||
|
||||
// Remove all buttons from the view
|
||||
while (items.firstChild) {
|
||||
items.removeChild(items.firstChild);
|
||||
items.firstChild.remove();
|
||||
}
|
||||
|
||||
// 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 textNode = text.createDocumentFragment(element);
|
||||
while (element.hasChildNodes())
|
||||
element.removeChild(element.firstChild);
|
||||
element.firstChild.remove();
|
||||
element.appendChild(textNode);
|
||||
if (text.base) {
|
||||
element.setAttributeNS(XML_NS, "base", text.base.spec);
|
||||
|
|
|
@ -185,7 +185,7 @@ var MigrationWizard = { /* exported MigrationWizard */
|
|||
|
||||
var profiles = document.getElementById("profiles");
|
||||
while (profiles.hasChildNodes())
|
||||
profiles.removeChild(profiles.firstChild);
|
||||
profiles.firstChild.remove();
|
||||
|
||||
// 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.
|
||||
|
@ -225,7 +225,7 @@ var MigrationWizard = { /* exported MigrationWizard */
|
|||
onImportItemsPageShow() {
|
||||
var dataSources = document.getElementById("dataSources");
|
||||
while (dataSources.hasChildNodes())
|
||||
dataSources.removeChild(dataSources.firstChild);
|
||||
dataSources.firstChild.remove();
|
||||
|
||||
var items = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
|
||||
for (var i = 0; i < 16; ++i) {
|
||||
|
@ -367,7 +367,7 @@ var MigrationWizard = { /* exported MigrationWizard */
|
|||
_listItems(aID) {
|
||||
var items = document.getElementById(aID);
|
||||
while (items.hasChildNodes())
|
||||
items.removeChild(items.firstChild);
|
||||
items.firstChild.remove();
|
||||
|
||||
var itemID;
|
||||
for (var i = 0; i < 16; ++i) {
|
||||
|
|
|
@ -1011,7 +1011,7 @@ PlacesToolbar.prototype = {
|
|||
|
||||
this._openedMenuButton = null;
|
||||
while (this._rootElt.hasChildNodes()) {
|
||||
this._rootElt.removeChild(this._rootElt.firstChild);
|
||||
this._rootElt.firstChild.remove();
|
||||
}
|
||||
|
||||
let cc = this._resultNode.childCount;
|
||||
|
@ -1952,7 +1952,7 @@ PlacesPanelMenuView.prototype = {
|
|||
|
||||
// Container is the toolbar itself.
|
||||
while (this._rootElt.hasChildNodes()) {
|
||||
this._rootElt.removeChild(this._rootElt.firstChild);
|
||||
this._rootElt.firstChild.remove();
|
||||
}
|
||||
|
||||
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.
|
||||
while (restorePopup.childNodes.length > 1)
|
||||
restorePopup.removeChild(restorePopup.firstChild);
|
||||
restorePopup.firstChild.remove();
|
||||
|
||||
Task.spawn(function* () {
|
||||
let backupFiles = yield PlacesBackups.getBackupFiles();
|
||||
|
@ -1007,7 +1007,7 @@ var ViewMenu = {
|
|||
return endElement;
|
||||
}
|
||||
while (popup.hasChildNodes()) {
|
||||
popup.removeChild(popup.firstChild);
|
||||
popup.firstChild.remove();
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
|
@ -81,7 +81,7 @@ var gBlocklistManager = {
|
|||
|
||||
let blocklistsText = document.getElementById("blocklistsText");
|
||||
while (blocklistsText.hasChildNodes()) {
|
||||
blocklistsText.removeChild(blocklistsText.firstChild);
|
||||
blocklistsText.firstChild.remove();
|
||||
}
|
||||
blocklistsText.appendChild(document.createTextNode(params.introText));
|
||||
|
||||
|
|
|
@ -557,7 +557,7 @@ var gAdvancedPane = {
|
|||
|
||||
var list = document.getElementById("offlineAppsList");
|
||||
while (list.firstChild) {
|
||||
list.removeChild(list.firstChild);
|
||||
list.firstChild.remove();
|
||||
}
|
||||
|
||||
var groups;
|
||||
|
|
|
@ -97,7 +97,7 @@ var gLanguagesDialog = {
|
|||
_buildAvailableLanguageList() {
|
||||
var availableLanguagesPopup = document.getElementById("availableLanguagesPopup");
|
||||
while (availableLanguagesPopup.hasChildNodes())
|
||||
availableLanguagesPopup.removeChild(availableLanguagesPopup.firstChild);
|
||||
availableLanguagesPopup.firstChild.remove();
|
||||
|
||||
// Sort the list of languages by name
|
||||
this._availableLanguagesList.sort(function(a, b) {
|
||||
|
@ -119,7 +119,7 @@ var gLanguagesDialog = {
|
|||
|
||||
readAcceptLanguages() {
|
||||
while (this._activeLanguages.hasChildNodes())
|
||||
this._activeLanguages.removeChild(this._activeLanguages.firstChild);
|
||||
this._activeLanguages.firstChild.remove();
|
||||
|
||||
var selectedIndex = 0;
|
||||
var preference = document.getElementById("intl.accept_languages");
|
||||
|
|
|
@ -218,7 +218,7 @@ var gPermissionManager = {
|
|||
|
||||
var permissionsText = document.getElementById("permissionsText");
|
||||
while (permissionsText.hasChildNodes())
|
||||
permissionsText.removeChild(permissionsText.firstChild);
|
||||
permissionsText.firstChild.remove();
|
||||
permissionsText.appendChild(document.createTextNode(aParams.introText));
|
||||
|
||||
document.title = aParams.windowTitle;
|
||||
|
|
|
@ -100,7 +100,7 @@ SyncedTabsDeckView.prototype = {
|
|||
|
||||
_clearChilden() {
|
||||
while (this.container.firstChild) {
|
||||
this.container.removeChild(this.container.firstChild);
|
||||
this.container.firstChild.remove();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ TabListView.prototype = {
|
|||
_clearChilden(node) {
|
||||
let parent = node || this.container;
|
||||
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
|
||||
// and the flex).
|
||||
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.
|
||||
|
|
|
@ -3898,7 +3898,7 @@ var PDFAttachmentViewer = function PDFAttachmentViewerClosure() {
|
|||
this.attachments = null;
|
||||
var container = this.container;
|
||||
while (container.firstChild) {
|
||||
container.removeChild(container.firstChild);
|
||||
container.firstChild.remove();
|
||||
}
|
||||
if (!keepRenderedCapability) {
|
||||
this._renderedCapability = pdfjsLib.createPromiseCapability();
|
||||
|
@ -4598,7 +4598,7 @@ var PDFOutlineViewer = function PDFOutlineViewerClosure() {
|
|||
this.lastToggleIsShow = true;
|
||||
var container = this.container;
|
||||
while (container.firstChild) {
|
||||
container.removeChild(container.firstChild);
|
||||
container.firstChild.remove();
|
||||
}
|
||||
},
|
||||
_dispatchEvent: function PDFOutlineViewer_dispatchEvent(outlineCount) {
|
||||
|
|
|
@ -36082,7 +36082,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
function removeChildren(e) {
|
||||
for (var count = e.childNodes.length; count > 0; --count)
|
||||
{ e.removeChild(e.firstChild) }
|
||||
{ e.firstChild.remove() }
|
||||
return e
|
||||
}
|
||||
|
||||
|
|
|
@ -576,7 +576,7 @@ ToolSidebar.prototype = {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -1604,7 +1604,7 @@ MarkupView.prototype = {
|
|||
// this container will do double duty as the container for the single
|
||||
// text child.
|
||||
while (container.children.firstChild) {
|
||||
container.children.removeChild(container.children.firstChild);
|
||||
container.children.firstChild.remove();
|
||||
}
|
||||
|
||||
container.setInlineTextChild(container.node.inlineTextChild);
|
||||
|
@ -1616,7 +1616,7 @@ MarkupView.prototype = {
|
|||
|
||||
if (!container.hasChildren) {
|
||||
while (container.children.firstChild) {
|
||||
container.children.removeChild(container.children.firstChild);
|
||||
container.children.firstChild.remove();
|
||||
}
|
||||
container.childrenDirty = false;
|
||||
container.setExpanded(false);
|
||||
|
@ -1659,7 +1659,7 @@ MarkupView.prototype = {
|
|||
}
|
||||
|
||||
while (container.children.firstChild) {
|
||||
container.children.removeChild(container.children.firstChild);
|
||||
container.children.firstChild.remove();
|
||||
}
|
||||
|
||||
if (!(children.hasFirst && children.hasLast)) {
|
||||
|
|
|
@ -1367,7 +1367,7 @@ var Scratchpad = {
|
|||
|
||||
recentFilesMenu.setAttribute("disabled", true);
|
||||
while (recentFilesPopup.hasChildNodes()) {
|
||||
recentFilesPopup.removeChild(recentFilesPopup.firstChild);
|
||||
recentFilesPopup.firstChild.remove();
|
||||
}
|
||||
|
||||
if (filePaths.length > 0) {
|
||||
|
|
|
@ -1019,7 +1019,7 @@ OutputPanel.prototype._update = function () {
|
|||
|
||||
// Empty this._div
|
||||
while (this._div.hasChildNodes()) {
|
||||
this._div.removeChild(this._div.firstChild);
|
||||
this._div.firstChild.remove();
|
||||
}
|
||||
|
||||
if (this.displayedOutput.data != null) {
|
||||
|
@ -1030,7 +1030,7 @@ OutputPanel.prototype._update = function () {
|
|||
}
|
||||
|
||||
while (this._div.hasChildNodes()) {
|
||||
this._div.removeChild(this._div.firstChild);
|
||||
this._div.firstChild.remove();
|
||||
}
|
||||
|
||||
let links = node.querySelectorAll("*[href]");
|
||||
|
|
|
@ -1554,7 +1554,7 @@ Cell.prototype = {
|
|||
this.label.removeAttribute("value");
|
||||
|
||||
while (this.label.firstChild) {
|
||||
this.label.removeChild(this.label.firstChild);
|
||||
this.label.firstChild.remove();
|
||||
}
|
||||
|
||||
this.label.appendChild(value);
|
||||
|
|
|
@ -201,7 +201,7 @@ Tooltip.prototype = {
|
|||
*/
|
||||
empty: function () {
|
||||
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");
|
||||
|
||||
while (list.firstChild) {
|
||||
list.removeChild(list.firstChild);
|
||||
list.firstChild.remove();
|
||||
}
|
||||
|
||||
let rules = editor.mediaRules;
|
||||
|
|
|
@ -156,7 +156,7 @@ exports.items = [
|
|||
onback: () => {
|
||||
// The back button clears and hides .csscoverage-report
|
||||
while (host.hasChildNodes()) {
|
||||
host.removeChild(host.firstChild);
|
||||
host.firstChild.remove();
|
||||
}
|
||||
host.hidden = true;
|
||||
}
|
||||
|
|
|
@ -388,7 +388,7 @@ exports.createElement = function(doc, tag) {
|
|||
*/
|
||||
exports.clearElement = function(elem) {
|
||||
while (elem.hasChildNodes()) {
|
||||
elem.removeChild(elem.firstChild);
|
||||
elem.firstChild.remove();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ function showpageshowcount()
|
|||
var div1 = document.getElementById("div1");
|
||||
while (div1.firstChild)
|
||||
{
|
||||
div1.removeChild(div1.firstChild);
|
||||
div1.firstChild.remove();
|
||||
}
|
||||
div1.appendChild(document.createTextNode(
|
||||
"pageshowcount: " + pageshowcount));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script>
|
||||
|
||||
function testDone() {
|
||||
document.body.removeChild(document.body.firstChild);
|
||||
document.body.firstChild.remove();
|
||||
var isOK = false;
|
||||
try {
|
||||
isOK = history.previous != location;
|
||||
|
|
|
@ -31,7 +31,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=570341
|
|||
|
||||
function showSequence(node){
|
||||
while(node.firstChild) {
|
||||
node.removeChild(node.firstChild);
|
||||
node.firstChild.remove();
|
||||
}
|
||||
var sequence = [];
|
||||
for (var p in moments) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
var root = document.documentElement;
|
||||
while(root.firstChild) { root.removeChild(root.firstChild); }
|
||||
while(root.firstChild) { root.firstChild.remove(); }
|
||||
var div = document.createElement("div");
|
||||
root.appendChild(div);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ function runTest() {
|
|||
ok(attrs != null, "Element should have attributes!");
|
||||
var attr = testParent.firstChild.getAttributeNode("someattr");
|
||||
ok(attr.value == "foo", "The value of the attribute should be 'foo'!");
|
||||
testParent.removeChild(testParent.firstChild);
|
||||
testParent.firstChild.remove();
|
||||
SpecialPowers.gc();
|
||||
ok(true, "Browser should not crash!")
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ function testChildList() {
|
|||
m = null;
|
||||
});
|
||||
m.observe(div, { childList: true});
|
||||
div.removeChild(div.firstChild);
|
||||
div.firstChild.remove();
|
||||
}
|
||||
|
||||
function testChildList2() {
|
||||
|
|
|
@ -5,7 +5,7 @@ function boom()
|
|||
{
|
||||
var r = document.documentElement;
|
||||
while (r.firstChild)
|
||||
r.removeChild(r.firstChild);
|
||||
r.firstChild.remove();
|
||||
|
||||
var b = document.createElement("BODY");
|
||||
var s = document.createElement("SCRIPT");
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
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("DOMNodeInsertedIntoDocument", function(){});
|
||||
|
|
|
@ -424,7 +424,7 @@ for (var name of elementNames) {
|
|||
for (var func of functions) {
|
||||
// Clean-up.
|
||||
while (content.firstChild) {
|
||||
content.removeChild(content.firstChild);
|
||||
content.firstChild.remove();
|
||||
}
|
||||
for (form of forms) {
|
||||
content.appendChild(form);
|
||||
|
|
|
@ -95,7 +95,7 @@ valueIs("abcdeTesth",
|
|||
"Modifying textnode text shouldn't affect value in edited textarea");
|
||||
defValueIs("abcdefghlmno", "Modified textnode text 3");
|
||||
|
||||
t.removeChild(t.firstChild);
|
||||
t.firstChild.remove();
|
||||
valueIs("abcdeTesth",
|
||||
"Removing child textnode shouldn't affect value in edited textarea");
|
||||
defValueIs("defghlmno", "Removed textnode 3");
|
||||
|
|
|
@ -78,7 +78,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=311681
|
|||
|
||||
function clear(node) {
|
||||
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) {
|
||||
while (node.hasChildNodes()) {
|
||||
node.removeChild(node.firstChild);
|
||||
node.firstChild.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ function remove() {
|
|||
var stage = document.getElementById("stage");
|
||||
var body = document.getElementsByTagName("BODY")[0];
|
||||
while (stage.firstChild) {
|
||||
stage.removeChild(stage.firstChild);
|
||||
stage.firstChild.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1545,7 +1545,7 @@ function removeNodeAndSource(n) {
|
|||
n.srcObject = null;
|
||||
n.src = "";
|
||||
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.
|
||||
while (overlay.firstChild) {
|
||||
overlay.removeChild(overlay.firstChild);
|
||||
overlay.firstChild.remove();
|
||||
}
|
||||
|
||||
var controlBar;
|
||||
|
|
|
@ -188,7 +188,7 @@ function testCurrentColorChange()
|
|||
|
||||
// Clean up
|
||||
gCircle.removeAttribute("color");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testCurrentColorChangeUsingStyle()
|
||||
|
@ -209,7 +209,7 @@ function testCurrentColorChangeUsingStyle()
|
|||
|
||||
// Clean up
|
||||
gCircle.removeAttribute("style");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function getFallbackColor(pServerStr)
|
||||
|
@ -236,7 +236,7 @@ function testCurrentColorChangeOnFallback()
|
|||
"Checking animated fallback fill=currentColor after updating context");
|
||||
|
||||
gCircle.removeAttribute("style");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testInheritChange()
|
||||
|
@ -255,7 +255,7 @@ function testInheritChange()
|
|||
"Checking animated fill=inherit after updating context");
|
||||
|
||||
gCircleParent.removeAttribute("fill");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testInheritChangeUsingStyle()
|
||||
|
@ -275,7 +275,7 @@ function testInheritChangeUsingStyle()
|
|||
+ "(using style attr)");
|
||||
|
||||
gCircleParent.removeAttribute("style");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testEmUnitChangeOnProp()
|
||||
|
@ -294,7 +294,7 @@ function testEmUnitChangeOnProp()
|
|||
"Checking animated font-size=2em after updating context");
|
||||
|
||||
gCircleParent.removeAttribute("font-size");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testEmUnitChangeOnPropBase()
|
||||
|
@ -319,7 +319,7 @@ function testEmUnitChangeOnPropBase()
|
|||
"Checking animated font-size=30px after updating context");
|
||||
|
||||
gCircleParent.removeAttribute("font-size");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testEmUnitChangeOnLength()
|
||||
|
@ -344,7 +344,7 @@ function testEmUnitChangeOnLength()
|
|||
"resampling");
|
||||
|
||||
gCircleParent.removeAttribute("font-size");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testPercentUnitChangeOnProp()
|
||||
|
@ -363,7 +363,7 @@ function testPercentUnitChangeOnProp()
|
|||
"Checking animated font-size=150% after updating context");
|
||||
|
||||
gCircleParent.removeAttribute("font-size");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testPercentUnitChangeOnLength()
|
||||
|
@ -399,7 +399,7 @@ function testPercentUnitChangeOnLength()
|
|||
"Checking animated length=100% after updating context");
|
||||
|
||||
gSvg.setAttribute("height", oldHeight);
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testRelativeFontSize()
|
||||
|
@ -421,7 +421,7 @@ function testRelativeFontSize()
|
|||
ok(fsize > 20, "Checking animated font-size > 20px after updating context");
|
||||
|
||||
gCircleParent.removeAttribute("font-size");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testRelativeFontWeight()
|
||||
|
@ -447,7 +447,7 @@ function testRelativeFontWeight()
|
|||
"Checking animated font-weight = 900 after updating context");
|
||||
|
||||
gCircleParent.removeAttribute("font-weight");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testRelativeFont()
|
||||
|
@ -479,7 +479,7 @@ function testRelativeFont()
|
|||
"Checking size of shorthand 'font' > 20px after updating context");
|
||||
|
||||
gCircleParent.removeAttribute("font-size");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testCalcFontSize()
|
||||
|
@ -500,7 +500,7 @@ function testCalcFontSize()
|
|||
"context");
|
||||
|
||||
gCircleParent.removeAttribute("font-size");
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
function testDashArray()
|
||||
|
@ -529,7 +529,7 @@ function testDashArray()
|
|||
|
||||
gSvg.setAttribute("height", oldHeight);
|
||||
gSvg.setAttribute("width", oldWidth);
|
||||
gCircle.removeChild(gCircle.firstChild);
|
||||
gCircle.firstChild.remove();
|
||||
}
|
||||
|
||||
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
|
||||
// added.
|
||||
while (elem.firstChild) {
|
||||
elem.removeChild(elem.firstChild);
|
||||
elem.firstChild.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ function runTest() {
|
|||
|
||||
// Dirty the frames.
|
||||
document.getElementById("display").style.width = "700px";
|
||||
svgText.removeChild(svgText.firstChild);
|
||||
svgText.firstChild.remove();
|
||||
|
||||
// Paint without flushing layout. If the test fails, we'll trigger
|
||||
// an assertion.
|
||||
|
|
|
@ -25,7 +25,7 @@ ok(length > 0, "text.getComputedTextLength() > 0");
|
|||
text.firstChild.nodeValue += "cd";
|
||||
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");
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -90,7 +90,7 @@ ok(firstDistNodes[0].id == "one" &&
|
|||
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.
|
||||
host.removeChild(host.firstChild);
|
||||
host.firstChild.remove();
|
||||
firstDistNodes = firstContent.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.");
|
||||
|
||||
// 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.");
|
||||
|
||||
|
@ -135,7 +135,7 @@ host.innerHTML = '<span></span>';
|
|||
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.
|
||||
host.removeChild(host.firstChild);
|
||||
host.firstChild.remove();
|
||||
|
||||
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()) {
|
||||
++counter;
|
||||
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[1].firstChild.data = "anon text changed" // Modifying text data
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ function doTests()
|
|||
is(actual, test[2], "sorted step " + (t + 1));
|
||||
|
||||
while(box.hasChildNodes())
|
||||
box.removeChild(box.firstChild);
|
||||
box.firstChild.remove();
|
||||
box.removeAttribute("sortDirection");
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=311681
|
|||
|
||||
function clear(node) {
|
||||
while (node.hasChildNodes()) {
|
||||
node.removeChild(node.firstChild);
|
||||
node.firstChild.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ function boom()
|
|||
{
|
||||
var r = document.documentElement;
|
||||
while(r.firstChild)
|
||||
r.removeChild(r.firstChild);
|
||||
r.firstChild.remove();
|
||||
|
||||
document.execCommand("contentReadOnly", false, "");
|
||||
document.documentElement.focus();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
addEventListener('DOMContentLoaded', function() {
|
||||
let root = document.documentElement;
|
||||
while(root.firstChild) {
|
||||
root.removeChild(root.firstChild);
|
||||
root.firstChild.remove();
|
||||
}
|
||||
document.designMode = 'on';
|
||||
document.removeChild(document.documentElement);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
addEventListener("DOMContentLoaded", function(){
|
||||
let root = document.documentElement;
|
||||
while(root.firstChild) {
|
||||
root.removeChild(root.firstChild);
|
||||
root.firstChild.remove();
|
||||
}
|
||||
let o_0 = document.createElement("body");
|
||||
root.appendChild(o_0);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
doc.body.appendChild(doc.createTextNode("foo"));
|
||||
doc.designMode = "on";
|
||||
while (doc.body.firstChild) {
|
||||
doc.body.removeChild(doc.body.firstChild);
|
||||
doc.body.firstChild.remove();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
function boom()
|
||||
{
|
||||
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");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
function boom() {
|
||||
var r = document.documentElement;
|
||||
while (r.firstChild) {
|
||||
r.removeChild(r.firstChild);
|
||||
r.firstChild.remove();
|
||||
}
|
||||
|
||||
document.documentElement.contentEditable = "true";
|
||||
|
|
|
@ -7,7 +7,7 @@ function boom()
|
|||
{
|
||||
var root = document.documentElement;
|
||||
while (root.firstChild) {
|
||||
root.removeChild(root.firstChild);
|
||||
root.firstChild.remove();
|
||||
}
|
||||
|
||||
var space = document.createTextNode(" ");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
function boom()
|
||||
{
|
||||
var root = document.documentElement;
|
||||
while (root.firstChild) { root.removeChild(root.firstChild); }
|
||||
while (root.firstChild) { root.firstChild.remove(); }
|
||||
root.contentEditable = "true";
|
||||
document.removeChild(root);
|
||||
document.appendChild(root);
|
||||
|
|
|
@ -7,7 +7,7 @@ function boom()
|
|||
{
|
||||
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 div = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
function boom()
|
||||
{
|
||||
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");
|
||||
body.setAttributeNS(null, "contenteditable", "true");
|
||||
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>");
|
||||
var elem = doc.createElement(goog.dom.TagName.DIV);
|
||||
elem.innerHTML = totalHtml.join("");
|
||||
return elem.removeChild(elem.firstChild)
|
||||
return elem.firstChild.remove()
|
||||
};
|
||||
goog.dom.htmlToDocumentFragment = function(htmlString) {
|
||||
return goog.dom.htmlToDocumentFragment_(document, htmlString)
|
||||
|
@ -2118,12 +2118,12 @@ goog.dom.htmlToDocumentFragment_ = function(doc, htmlString) {
|
|||
var tempDiv = doc.createElement("div");
|
||||
if(goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT) {
|
||||
tempDiv.innerHTML = "<br>" + htmlString;
|
||||
tempDiv.removeChild(tempDiv.firstChild)
|
||||
tempDiv.firstChild.remove()
|
||||
}else {
|
||||
tempDiv.innerHTML = htmlString
|
||||
}
|
||||
if(tempDiv.childNodes.length == 1) {
|
||||
return tempDiv.removeChild(tempDiv.firstChild)
|
||||
return tempDiv.firstChild.remove()
|
||||
}else {
|
||||
var fragment = doc.createDocumentFragment();
|
||||
while(tempDiv.firstChild) {
|
||||
|
|
|
@ -16,7 +16,7 @@ function boom()
|
|||
{
|
||||
var root = document.documentElement;
|
||||
while(root.firstChild) {
|
||||
root.removeChild(root.firstChild);
|
||||
root.firstChild.remove();
|
||||
}
|
||||
root.appendChild(document.createTextNode("Mozilla"));
|
||||
root.focus();
|
||||
|
|
|
@ -44,7 +44,7 @@ SimpleTest.waitForFocus(function() {
|
|||
var beforeB = snapshotWindow(win, true);
|
||||
is(b.textContent, "X", "Typing should work");
|
||||
while (b.firstChild) {
|
||||
b.removeChild(b.firstChild);
|
||||
b.firstChild.remove();
|
||||
}
|
||||
ok(editorCommandsEnabled(), "The editor commands should work");
|
||||
|
||||
|
@ -58,7 +58,7 @@ SimpleTest.waitForFocus(function() {
|
|||
var afterB = snapshotWindow(win, true);
|
||||
is(b.textContent, "X", "Typing should work");
|
||||
while (b.firstChild) {
|
||||
b.removeChild(b.firstChild);
|
||||
b.firstChild.remove();
|
||||
}
|
||||
ok(editorCommandsEnabled(), "The editor commands should work");
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
function doTest()
|
||||
{
|
||||
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");
|
||||
r.appendChild(body);
|
||||
body.contentEditable = "true";
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
document.body.offsetWidth;
|
||||
var div = document.getElementById("x");
|
||||
div.id = "y";
|
||||
div.removeChild(div.firstChild);
|
||||
div.firstChild.remove();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
function boom()
|
||||
{
|
||||
var z = document.getElementById("z");
|
||||
z.removeChild(z.firstChild);
|
||||
z.firstChild.remove();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -9,7 +9,7 @@ function boom()
|
|||
++i;
|
||||
|
||||
while (document.body.firstChild)
|
||||
document.body.removeChild(document.body.firstChild);
|
||||
document.body.firstChild.remove();
|
||||
|
||||
var table = document.createElement("table");
|
||||
document.body.appendChild(table);
|
||||
|
|
|
@ -8,7 +8,7 @@ function boom()
|
|||
var legend = document.getElementById("legend");
|
||||
legend.appendChild(document.createTextNode("T"));
|
||||
document.documentElement.offsetHeight;
|
||||
legend.removeChild(legend.firstChild);
|
||||
legend.firstChild.remove();
|
||||
document.body.removeChild(legend);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ div { -moz-column-count: 2; width: 0; }
|
|||
function boom()
|
||||
{
|
||||
var v = document.getElementById("v");
|
||||
v.removeChild(v.firstChild);
|
||||
v.firstChild.remove();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -57,7 +57,7 @@ function bounceDE()
|
|||
|
||||
function clearChildren(root)
|
||||
{
|
||||
while(root.firstChild) { root.removeChild(root.firstChild); }
|
||||
while(root.firstChild) { root.firstChild.remove(); }
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -13,7 +13,7 @@ div:first-letter { float: right; }
|
|||
function boom()
|
||||
{
|
||||
var d = document.getElementById('d');
|
||||
d.removeChild(d.firstChild);
|
||||
d.firstChild.remove();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -10,7 +10,7 @@ body:first-letter { float: right; }
|
|||
|
||||
function boom()
|
||||
{
|
||||
document.body.removeChild(document.body.firstChild);
|
||||
document.body.firstChild.remove();
|
||||
document.body.appendChild(document.createTextNode('x'));
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</style>
|
||||
<script>
|
||||
function boom() {
|
||||
document.body.removeChild(document.body.firstChild);
|
||||
document.body.firstChild.remove();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -12,7 +12,7 @@ div { height: 1px; }
|
|||
function boom()
|
||||
{
|
||||
var a = document.getElementById("a");
|
||||
a.removeChild(a.firstChild);
|
||||
a.firstChild.remove();
|
||||
document.documentElement.style.outline = "none";
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ function boom()
|
|||
v.childNodes[1].firstChild.data = "";
|
||||
document.documentElement.offsetHeight;
|
||||
v.appendChild(document.createTextNode("D"));
|
||||
v.removeChild(v.firstChild);
|
||||
v.firstChild.remove();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
function boom()
|
||||
{
|
||||
while (document.documentElement.firstChild)
|
||||
document.documentElement.removeChild(document.documentElement.firstChild);
|
||||
document.documentElement.firstChild.remove();
|
||||
document.documentElement.contentEditable = "true";
|
||||
document.execCommand("strikethrough", false, null);
|
||||
try { document.execCommand("justifyfull", false, null); } catch(e) { }
|
||||
|
|
|
@ -6,7 +6,7 @@ function boom()
|
|||
var r = document.documentElement;
|
||||
|
||||
while (r.firstChild)
|
||||
r.removeChild(r.firstChild);
|
||||
r.firstChild.remove();
|
||||
|
||||
var a = document.createTextNode("a");
|
||||
r.appendChild(a);
|
||||
|
|
|
@ -11,7 +11,7 @@ function boom()
|
|||
document.documentElement.offsetHeight;
|
||||
var s = document.getElementById("s");
|
||||
|
||||
s.removeChild(s.firstChild);
|
||||
s.firstChild.remove();
|
||||
|
||||
document.documentElement.offsetHeight;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
function boom()
|
||||
{
|
||||
var root = document.documentElement;
|
||||
while(root.firstChild) { root.removeChild(root.firstChild); }
|
||||
while(root.firstChild) { root.firstChild.remove(); }
|
||||
root.appendChild(document.createElement("body"));
|
||||
root.offsetHeight;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ function boom()
|
|||
|
||||
// A dynamic change
|
||||
var x = document.getElementById("x");
|
||||
x.removeChild(x.firstChild);
|
||||
x.firstChild.remove();
|
||||
x.appendChild(document.createTextNode("\n\n\n"));
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<script>
|
||||
function loaded() {
|
||||
var f = document.getElementById("x");
|
||||
f.removeChild(f.firstChild);
|
||||
f.firstChild.remove();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -37,7 +37,7 @@ function bounce()
|
|||
var docElemChildren = [];
|
||||
while (docElem.firstChild) {
|
||||
docElemChildren.push(docElem.firstChild);
|
||||
docElem.removeChild(docElem.firstChild);
|
||||
docElem.firstChild.remove();
|
||||
}
|
||||
|
||||
for (var i = 0; i < docElemChildren.length; ++i)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
function boom()
|
||||
{
|
||||
var n = document.getElementById("editMe");
|
||||
n.removeChild(n.firstChild);
|
||||
n.firstChild.remove();
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
function boom()
|
||||
{
|
||||
var a = document.getElementById("a");
|
||||
a.removeChild(a.firstChild);
|
||||
a.firstChild.remove();
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
function boom()
|
||||
{
|
||||
var a = document.getElementById("a");
|
||||
a.removeChild(a.firstChild);
|
||||
a.firstChild.remove();
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -12,7 +12,7 @@ l.textContent = "#1";
|
|||
fs1.insertBefore(l, fs1.firstChild);
|
||||
|
||||
var fs2 = document.getElementById("fs2");
|
||||
fs2.removeChild(fs2.firstChild);
|
||||
fs2.firstChild.remove();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -22,7 +22,7 @@ function boom()
|
|||
document.getElementById("div").style.MozBinding = "url('#foo')";
|
||||
|
||||
var opt1 = document.getElementById("opt1");
|
||||
opt1.removeChild(opt1.firstChild);
|
||||
opt1.firstChild.remove();
|
||||
|
||||
document.getElementById("textarea").value += " y";
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<script type="text/javascript" language="javascript">
|
||||
function doMore(data) {
|
||||
while(data.hasChildNodes())
|
||||
data.removeChild(data.firstChild);
|
||||
data.firstChild.remove();
|
||||
for (var i = 0; i < 10; i++) {
|
||||
append(data);
|
||||
}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче