Merge pull request #8138 from Snuffleupagus/bug-1345253
Get rid of `element.removeChild(element.firstChild)` usage (bug 1345253)
This commit is contained in:
commit
a544a3b4a4
@ -61,10 +61,8 @@ var PDFAttachmentViewer = (function PDFAttachmentViewerClosure() {
|
|||||||
reset: function PDFAttachmentViewer_reset(keepRenderedCapability) {
|
reset: function PDFAttachmentViewer_reset(keepRenderedCapability) {
|
||||||
this.attachments = null;
|
this.attachments = null;
|
||||||
|
|
||||||
var container = this.container;
|
// Remove the attachments from the DOM.
|
||||||
while (container.firstChild) {
|
this.container.textContent = '';
|
||||||
container.removeChild(container.firstChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!keepRenderedCapability) {
|
if (!keepRenderedCapability) {
|
||||||
// NOTE: The *only* situation in which the `_renderedCapability` should
|
// NOTE: The *only* situation in which the `_renderedCapability` should
|
||||||
|
@ -63,10 +63,11 @@ var PDFOutlineViewer = (function PDFOutlineViewerClosure() {
|
|||||||
this.outline = null;
|
this.outline = null;
|
||||||
this.lastToggleIsShow = true;
|
this.lastToggleIsShow = true;
|
||||||
|
|
||||||
var container = this.container;
|
// Remove the outline from the DOM.
|
||||||
while (container.firstChild) {
|
this.container.textContent = '';
|
||||||
container.removeChild(container.firstChild);
|
// Ensure that the left (right in RTL locales) margin is always reset,
|
||||||
}
|
// to prevent incorrect outline alignment if a new document is opened.
|
||||||
|
this.container.classList.remove('outlineWithDeepNesting');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user