Bug 1280362 - Remove DocumentWrite and htmlesc as unused. r=arai

--HG--
extra : rebase_source : 8343509b1250ab440e18c516748031687063f65b
This commit is contained in:
Jeff Walden 2016-07-27 23:02:29 -07:00
parent 57cc3af889
commit f8b0f4ec6d

View File

@ -30,7 +30,6 @@
var documentBody = global.document.body;
var documentDocumentElement = global.document.documentElement;
var DocumentCreateElement = global.document.createElement;
var HTMLDocumentPrototypeWrite = global.HTMLDocument.prototype.write;
var ElementInnerHTMLSetter =
ObjectGetOwnPropertyDescriptor(global.Element.prototype, "innerHTML").set;
var HTMLIFramePrototypeContentWindowGetter =
@ -64,10 +63,6 @@
ReflectApply(HTMLElementPrototypeSetAttribute, element, [name, value]);
}
function SetInnerHTML(element, html) {
ReflectApply(ElementInnerHTMLSetter, element, [html]);
}
function SetTextContent(element, text) {
ReflectApply(NodePrototypeTextContentSetter, element, [text]);
}
@ -92,21 +87,6 @@
global.newGlobal = newGlobal;
}
// This function is *only* used in this file! Ultimately it should only be
// used by other exports in this IIFE, but for now just export it so that
// functions not exported within this IIFE (but still in this file) can use
// it.
function DocumentWrite(s) {
try {
var msgDiv = CreateElement('div');
SetInnerHTML(msgDiv, s);
AppendChild(documentBody, msgDiv);
} catch (e) {
ReflectApply(HTMLDocumentPrototypeWrite, document, [s + "<br>\n"]);
}
}
global.DocumentWrite = DocumentWrite;
// This function is *only* used by this file's |print()| function! It's only
// defined/exported here because |print| is defined outside this IIFE and
// because it needs access to unadulterated functionality as originally
@ -203,16 +183,6 @@ function setRestoreFunction(restore) {
jstestsRestoreFunction = restore;
}
function htmlesc(str) {
if (str == '<')
return '&lt;';
if (str == '>')
return '&gt;';
if (str == '&')
return '&amp;';
return str;
}
function print() {
var s = 'TEST-INFO | ';
var a;