Unmodified span span : [object HTMLSpanElement] [span] : [object HTMLSpanElement] String(span) : [object HTMLSpanElement] String([span]) : [object HTMLSpanElement] span.toString : function toString() { [native code] } span.toString() (cached in variable) : [object Undefined] span.toString() : [object HTMLSpanElement] [span].toString() : [object HTMLSpanElement] span.valueOf() : [object HTMLSpanElement] [span].valueOf() : [object HTMLSpanElement] span with modified toString and valueOf span : valueOf [span] : toString String(span) : toString String([span]) : toString span.toString : function () { return "toString" } span.toString() (cached in variable) : toString span.toString() : toString [span].toString() : toString span.valueOf() : valueOf [span].valueOf() : toString span with modified toString that returns an Object span : valueOf [span] : valueOf String(span) : valueOf String([span]) : valueOf span.toString : function () { return new Object(); } span.toString() (cached in variable) : [object Object] span.toString() : [object Object] [span].toString() : valueOf span.valueOf() : valueOf [span].valueOf() : valueOf span with modified valueOf that returns an Object span : toString [span] : toString String(span) : toString String([span]) : toString span.toString : function () { return 'toString'; } span.toString() (cached in variable) : toString span.toString() : toString [span].toString() : toString span.valueOf() : [object Object] [span].valueOf() : toString span with modified toString and valueOf that returns an Object TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value span.toString : function () { return new Object(); } span.toString() (cached in variable) : [object Object] span.toString() : [object Object] TypeError: Cannot convert object to primitive value span.valueOf() : [object Object] TypeError: Cannot convert object to primitive value span with modified toString that throws an exception span : valueOf Exception Exception Exception span.toString : function () { throw "Exception"; } Exception Exception Exception span.valueOf() : valueOf Exception span with modified valueOf that throws an exception Exception [span] : toString String(span) : toString String([span]) : toString span.toString : function () { return 'toString'; } span.toString() (cached in variable) : toString span.toString() : toString [span].toString() : toString Exception [span].valueOf() : toString span with modified toString an valueOf that throw exceptions Exception Exception Exception Exception span.toString : function () { throw "Exception"; } Exception Exception Exception Exception Exception Unmodified window window : [object Window] [window] : [object Window] String(window) : [object Window] String([window]) : [object Window] window.toString : function toString() { [native code] } window.toString() (cached in variable) : [object Undefined] window.toString() : [object Window] [window].toString() : [object Window] window.valueOf() : [object Window] [window].valueOf() : [object Window] window with modified toString and valueOf window : valueOf [window] : toString String(window) : toString String([window]) : toString window.toString : function () { return "toString" } window.toString() (cached in variable) : toString window.toString() : toString [window].toString() : toString window.valueOf() : valueOf [window].valueOf() : toString window with modified toString that returns an Object window : valueOf [window] : valueOf String(window) : valueOf String([window]) : valueOf window.toString : function () { return new Object(); } window.toString() (cached in variable) : [object Object] window.toString() : [object Object] [window].toString() : valueOf window.valueOf() : valueOf [window].valueOf() : valueOf window with modified valueOf that returns an Object window : toString [window] : toString String(window) : toString String([window]) : toString window.toString : function () { return 'toString'; } window.toString() (cached in variable) : toString window.toString() : toString [window].toString() : toString window.valueOf() : [object Object] [window].valueOf() : toString window with modified toString and valueOf that returns an Object TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value window.toString : function () { return new Object(); } window.toString() (cached in variable) : [object Object] window.toString() : [object Object] TypeError: Cannot convert object to primitive value window.valueOf() : [object Object] TypeError: Cannot convert object to primitive value window with modified toString that throws an exception window : valueOf Exception Exception Exception window.toString : function () { throw "Exception"; } Exception Exception Exception window.valueOf() : valueOf Exception window with modified valueOf that throws an exception Exception [window] : toString String(window) : toString String([window]) : toString window.toString : function () { return 'toString'; } window.toString() (cached in variable) : toString window.toString() : toString [window].toString() : toString Exception [window].valueOf() : toString window with modified toString an valueOf that throw exceptions Exception Exception Exception Exception window.toString : function () { throw "Exception"; } Exception Exception Exception Exception Exception Unmodified Navigator Navigator : [object Navigator] [Navigator] : [object Navigator] String(Navigator) : [object Navigator] String([Navigator]) : [object Navigator] Navigator.toString : function toString() { [native code] } Navigator.toString() (cached in variable) : [object Undefined] Navigator.toString() : [object Navigator] [Navigator].toString() : [object Navigator] Navigator.valueOf() : [object Navigator] [Navigator].valueOf() : [object Navigator] Navigator with modified toString and valueOf Navigator : valueOf [Navigator] : toString String(Navigator) : toString String([Navigator]) : toString Navigator.toString : function () { return "toString" } Navigator.toString() (cached in variable) : toString Navigator.toString() : toString [Navigator].toString() : toString Navigator.valueOf() : valueOf [Navigator].valueOf() : toString Navigator with modified toString that returns an Object Navigator : valueOf [Navigator] : valueOf String(Navigator) : valueOf String([Navigator]) : valueOf Navigator.toString : function () { return new Object(); } Navigator.toString() (cached in variable) : [object Object] Navigator.toString() : [object Object] [Navigator].toString() : valueOf Navigator.valueOf() : valueOf [Navigator].valueOf() : valueOf Navigator with modified valueOf that returns an Object Navigator : toString [Navigator] : toString String(Navigator) : toString String([Navigator]) : toString Navigator.toString : function () { return 'toString'; } Navigator.toString() (cached in variable) : toString Navigator.toString() : toString [Navigator].toString() : toString Navigator.valueOf() : [object Object] [Navigator].valueOf() : toString Navigator with modified toString and valueOf that returns an Object TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value Navigator.toString : function () { return new Object(); } Navigator.toString() (cached in variable) : [object Object] Navigator.toString() : [object Object] TypeError: Cannot convert object to primitive value Navigator.valueOf() : [object Object] TypeError: Cannot convert object to primitive value Navigator with modified toString that throws an exception Navigator : valueOf Exception Exception Exception Navigator.toString : function () { throw "Exception"; } Exception Exception Exception Navigator.valueOf() : valueOf Exception Navigator with modified valueOf that throws an exception Exception [Navigator] : toString String(Navigator) : toString String([Navigator]) : toString Navigator.toString : function () { return 'toString'; } Navigator.toString() (cached in variable) : toString Navigator.toString() : toString [Navigator].toString() : toString Exception [Navigator].valueOf() : toString Navigator with modified toString an valueOf that throw exceptions Exception Exception Exception Exception Navigator.toString : function () { throw "Exception"; } Exception Exception Exception Exception Exception Unmodified History History : [object History] [History] : [object History] String(History) : [object History] String([History]) : [object History] History.toString : function toString() { [native code] } History.toString() (cached in variable) : [object Undefined] History.toString() : [object History] [History].toString() : [object History] History.valueOf() : [object History] [History].valueOf() : [object History] History with modified toString and valueOf History : valueOf [History] : toString String(History) : toString String([History]) : toString History.toString : function () { return "toString" } History.toString() (cached in variable) : toString History.toString() : toString [History].toString() : toString History.valueOf() : valueOf [History].valueOf() : toString History with modified toString that returns an Object History : valueOf [History] : valueOf String(History) : valueOf String([History]) : valueOf History.toString : function () { return new Object(); } History.toString() (cached in variable) : [object Object] History.toString() : [object Object] [History].toString() : valueOf History.valueOf() : valueOf [History].valueOf() : valueOf History with modified valueOf that returns an Object History : toString [History] : toString String(History) : toString String([History]) : toString History.toString : function () { return 'toString'; } History.toString() (cached in variable) : toString History.toString() : toString [History].toString() : toString History.valueOf() : [object Object] [History].valueOf() : toString History with modified toString and valueOf that returns an Object TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value History.toString : function () { return new Object(); } History.toString() (cached in variable) : [object Object] History.toString() : [object Object] TypeError: Cannot convert object to primitive value History.valueOf() : [object Object] TypeError: Cannot convert object to primitive value History with modified toString that throws an exception History : valueOf Exception Exception Exception History.toString : function () { throw "Exception"; } Exception Exception Exception History.valueOf() : valueOf Exception History with modified valueOf that throws an exception Exception [History] : toString String(History) : toString String([History]) : toString History.toString : function () { return 'toString'; } History.toString() (cached in variable) : toString History.toString() : toString [History].toString() : toString Exception [History].valueOf() : toString History with modified toString an valueOf that throw exceptions Exception Exception Exception Exception History.toString : function () { throw "Exception"; } Exception Exception Exception Exception Exception Unmodified Selection Selection : [Selection] : String(Selection) : String([Selection]) : Selection.toString : function toString() { [native code] } TypeError: Illegal invocation Selection.toString() : [Selection].toString() : Selection.valueOf() : [Selection].valueOf() : Selection with modified toString and valueOf Selection : valueOf [Selection] : toString String(Selection) : toString String([Selection]) : toString Selection.toString : function () { return "toString" } Selection.toString() (cached in variable) : toString Selection.toString() : toString [Selection].toString() : toString Selection.valueOf() : valueOf [Selection].valueOf() : toString Selection with modified toString that returns an Object Selection : valueOf [Selection] : valueOf String(Selection) : valueOf String([Selection]) : valueOf Selection.toString : function () { return new Object(); } Selection.toString() (cached in variable) : [object Object] Selection.toString() : [object Object] [Selection].toString() : valueOf Selection.valueOf() : valueOf [Selection].valueOf() : valueOf Selection with modified valueOf that returns an Object Selection : toString [Selection] : toString String(Selection) : toString String([Selection]) : toString Selection.toString : function () { return 'toString'; } Selection.toString() (cached in variable) : toString Selection.toString() : toString [Selection].toString() : toString Selection.valueOf() : [object Object] [Selection].valueOf() : toString Selection with modified toString and valueOf that returns an Object TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value TypeError: Cannot convert object to primitive value Selection.toString : function () { return new Object(); } Selection.toString() (cached in variable) : [object Object] Selection.toString() : [object Object] TypeError: Cannot convert object to primitive value Selection.valueOf() : [object Object] TypeError: Cannot convert object to primitive value Selection with modified toString that throws an exception Selection : valueOf Exception Exception Exception Selection.toString : function () { throw "Exception"; } Exception Exception Exception Selection.valueOf() : valueOf Exception Selection with modified valueOf that throws an exception Exception [Selection] : toString String(Selection) : toString String([Selection]) : toString Selection.toString : function () { return 'toString'; } Selection.toString() (cached in variable) : toString Selection.toString() : toString [Selection].toString() : toString Exception [Selection].valueOf() : toString Selection with modified toString an valueOf that throw exceptions Exception Exception Exception Exception Selection.toString : function () { throw "Exception"; } Exception Exception Exception Exception Exception