Thanks a lot. That explains everything. I should have thought about the prototype.
--- In svg-developers@yahoogroups.com, "Martin Honnen" <[EMAIL PROTECTED]> wrote: > > --- In svg-developers@yahoogroups.com, "lxmachine" <lxmachine@> wrote: > > > > The test has the same result under Firefox and ASV. > > Anyone has similar problem before? > > > > An array object defined in the html document > > is passed into a function defined in the > > SVG document. When I run the > > instanceof Array test, it returns false. > > > > However, all the array methods and properties > > are still available as normal. > > > > It's very weird. > > It is not really weird. JavaScript has inheritance based on prototype > objects and instanceof just checks that. Inside the browser each > window has its own global object and each global object has its own > native objects like Object or Array. If you create an array in one > window and check it against the Array object in the other window then > the instanceof check fails. > See this example: > <http://home.arcor.de/martin.honnen/svg/test2007051901.html> > ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/