On Fri, 23 Jun 2006 13:49:48 +0400, Peter B. Shalimoff wrote:

> That for-in loop must be placed _after_ you're done adding your own
> functions to Array.prototype. Anyway, that workaround is not really good,
> because it brings (a little) overhead. Instead of looping through properties
> of Array.prototype, it's better to define substr() method once - in
> Object.prototype:
> 
> Object.prototype.substr = function(){return "...";};

Thanks for the info. While your solution fixes the error that crops up
in SeaMonkey js. This doesn't protect against random extensions using
the for...in operator. Since in the Firefly code there is only one
consumer (tree.xbl) for the inArray method, I've moved the code into the
tree.xbl as an additional method of the XBL widget.

Phil
-- 
Philip Chee <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]When you discover you are dead, avoid driving a car.
* TagZilla 0.059
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to