Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Customize boolean conversion

0 views
Skip to first unread message

Marc Guillemot

unread,
Jan 11, 2008, 11:06:07 AM1/11/08
to
Hi,

in HtmlUnit I need to simulate Firefox results for following
(document.all being a custom host object):

document.all ? true : false // -> false
Boolean(document.all) // -> true

It seems to me that I can't do that with current Rhino state: Rhino
handles boolean conversion the same way in both above cases, and unless
language version is set < 1.3, getDefaultValue is not called on the object.

Is this correct? Is there an other way to handle this?

Cheers,
Marc.
--
Blog: http://mguillem.wordpress.com

Marc Guillemot

unread,
Jan 14, 2008, 5:24:30 AM1/14/08
to
I've created an issue with attached patch to implement new feature
Context.FEATURE_NON_ECMA_TO_BOOLEAN:
https://bugzilla.mozilla.org/show_bug.cgi?id=412247

Can a Rhino committer look at it? This would allow HtmlUnit (as well as
other projects using Rhino to simulate a browser) to correctly handle
document.all boolean conversion.

Cheers,
Marc.
--
Blog: http://mguillem.wordpress.com

Attila Szegedi

unread,
Jan 15, 2008, 4:07:43 AM1/15/08
to Marc Guillemot, dev-tech-js-...@lists.mozilla.org
I can't promise I'll be able to look at it short term. There's just
too much on my plate on my paid job, and lately I'm scarcely finding
time for anything unrelated.

Attila.

Norris Boyd

unread,
Jan 15, 2008, 5:29:23 PM1/15/08
to

I'll take a look when I get a chance, perhaps on my plane flight
Thursday.

--N

0 new messages