You are currently viewing the BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
How can I create new methods for IE DOM objects? Since they don't extend from Objects like they do with Geko based browsers I'm unable to use prototype. The objects I'm talking about are instantiated from
new ActiveXObject("MSXML2.DOMDocument.x.0") (replace x with version)
As I said, I've prototyped them for mozilla and they work fine, just can't do the same for IE.
Any ideas?
-Paul
P.S. I've tried behaviors with htc files to no avail.
Sorry, what you're asking is not possible. Since the XML DOM is an ActiveX control in IE, you are expressing forbidden from extending it or adding new methods. This is a security feature to prevent malicious coding of ActiveX controls by people who didn't write them.
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088) http://www.nczonline.net/
Ah, well that would explain that:)
Thanks for your super quick reply, good luck on your upcomming book, after reading your last one, js for web dev, i'm certainly looking forward to this next one.