I'm writing a library where I want to override document.write( ), but for
all document objects; thus, I want to put it in the prototype. I tried
Document.protot ype.write= my_doc_write ;
but it didn't work. I discovered that this seemed to work:
HTMLDocument.pr ototype.write= my_doc_write ;
Why does HTMLDocument work here but not Document? Will this second
version work reliably across browsers, etc.? Anything to be careful of?
I'm unclear on the relationship between HTMLDocument and Document, which
seems important here. Also, which of the two to use in which situations.
Any explanations of this or appropriate links are welcome.
Thanks!
James
............... ............... ............... ............... ............... ..
James Marshall james@jmarshall .com Berkeley, CA @}-'-,--
"Teach people what you know."
............... ............... ............... ............... ............... ..
all document objects; thus, I want to put it in the prototype. I tried
Document.protot ype.write= my_doc_write ;
but it didn't work. I discovered that this seemed to work:
HTMLDocument.pr ototype.write= my_doc_write ;
Why does HTMLDocument work here but not Document? Will this second
version work reliably across browsers, etc.? Anything to be careful of?
I'm unclear on the relationship between HTMLDocument and Document, which
seems important here. Also, which of the two to use in which situations.
Any explanations of this or appropriate links are welcome.
Thanks!
James
............... ............... ............... ............... ............... ..
James Marshall james@jmarshall .com Berkeley, CA @}-'-,--
"Teach people what you know."
............... ............... ............... ............... ............... ..
Comment