Methods on IE
Mr.IE: "WRITE is a method of a document object."
The little fox: "yea"
Mr.IE: "And type of document.write is object."
The little fox: !?
The little fox: "Type of document.write must be function."
Mr.IE: "No! it's Object!!!"
Finally I couldn't understand what Mr.IE said.
javascript:var something=document.write;alert(typeof something);void(0);
"object" // IE6,IE7
"function" // Firefox
Does anyone knows any reasons?
[652 byte] By [
coma] at [2007-12-24]
Thanks for your reply.
Methods should be function on JavaScript/JScript/ECMAScript,
even if the method belongs to host objects, i thought.
But "document.write()", "window.alert()"... are not function
on IE.
- javascript:alert(document.write);
function write() { [native code] } // IE, Firefox
- javascript:alert(document.write instanceof Function);
false // IE
true // Firefox
- javascript:alert(typeof document.write);
object // IE
function // Firefox
These differences may cause some bugs.
How to Crash Internet Explorer
http://www.modernlifeisrubbish.co.uk/how-to-crash-internet-explorer.asp