Index: src/string.js |
diff --git a/src/string.js b/src/string.js |
index 0d5ed0fc4297c49b0f79917de5a9e6b6a2758c4d..09564d00593ba41f53c782071edd0c9c1c304e4b 100644 |
--- a/src/string.js |
+++ b/src/string.js |
@@ -839,66 +839,79 @@ function HtmlEscape(str) { |
// Compatibility support for KJS. |
// Tested by mozilla/js/tests/js1_5/Regress/regress-276103.js. |
function StringLink(s) { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.link"); |
Yang
2014/08/05 10:34:19
Now that all of this is specified in ES6, do you m
|
return "<a href=\"" + HtmlEscape(s) + "\">" + this + "</a>"; |
} |
function StringAnchor(name) { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.anchor"); |
return "<a name=\"" + HtmlEscape(name) + "\">" + this + "</a>"; |
} |
function StringFontcolor(color) { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.fontcolor"); |
return "<font color=\"" + HtmlEscape(color) + "\">" + this + "</font>"; |
} |
function StringFontsize(size) { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.fontsize"); |
return "<font size=\"" + HtmlEscape(size) + "\">" + this + "</font>"; |
} |
function StringBig() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.big"); |
return "<big>" + this + "</big>"; |
} |
function StringBlink() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.blink"); |
return "<blink>" + this + "</blink>"; |
} |
function StringBold() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.bold"); |
return "<b>" + this + "</b>"; |
} |
function StringFixed() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.fixed"); |
return "<tt>" + this + "</tt>"; |
} |
function StringItalics() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.italics"); |
return "<i>" + this + "</i>"; |
} |
function StringSmall() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.small"); |
return "<small>" + this + "</small>"; |
} |
function StringStrike() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.strike"); |
return "<strike>" + this + "</strike>"; |
} |
function StringSub() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.sub"); |
return "<sub>" + this + "</sub>"; |
} |
function StringSup() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.sup"); |
return "<sup>" + this + "</sup>"; |
} |