Benjamin Smedberg
unread,Jan 24, 2012, 1:49:37 PM1/24/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Michael A. Puls II, dev-apps...@lists.mozilla.org
On 1/20/12 9:14 AM, Michael A. Puls II wrote:
> Object.defineProperty(String.prototype, "com_example_bool", {
> get : function() {
> return (/^(true|1)$/i).test(this);
> }
> });
> alert("true".com_example_bool);
>
> That returns true in Opera, IE9, Chrome Canary and Safari, but returns
> false in Firefox (at least latest trunk).
>
> Anyone know why?
Because I haven't seen a reply to this, I went ahead and filed bug
720760. This doesn't appear to be related to the regexes, but instead
the `this` object for the getter function.
--BDS