This project is archived and is in readonly mode.

#155 ✓resolved
ronin-24204 (at lighthouseapp)

getBoxObjectFor() is deprecated

Reported by ronin-24204 (at lighthouseapp) | June 23rd, 2008 @ 01:31 PM | in 2.0 (closed)

Hi, upgrading firefox to version 3.0 now it give me this warning:

Warning: Use of getBoxObjectFor() is deprecated. Try to use element.getBoundingClientRect() if possible.

It should be only in Browser.Engine initialization.

Abenzka

Comments and changes to this ticket

  • Tom Occhino

    Tom Occhino September 21st, 2008 @ 05:54 PM

    • State changed from “new” to “invalid”
    • Tag cleared.

    we dont use getBoxObjectFor anywhere in MooTools...

  • ronin-24204 (at lighthouseapp)

    ronin-24204 (at lighthouseapp) September 22nd, 2008 @ 07:07 AM

    Mootools Core, Line 308

    "else if (document.getBoxObjectFor != null) Browser.Engine = {name: 'gecko', version: (document.getElementsByClassName) ? 19 : 18}; "

  • Tom Occhino

    Tom Occhino September 22nd, 2008 @ 09:56 PM

    • State changed from “invalid” to “hold”

    /me blushes...

    oops, I'm not afraid to admit when I'm wrong :P sorry about that.

    Anyway, we still aren't getting any warnings in Firefox 3, can you be more specific about the problem? When do you see it and where?

    Also, it's really helpful for us if you give us the actual file the error is located in (line 308 of MooTools Core isn't as helpful as saying line 19 of Browser.js) :)

  • ronin-24204 (at lighthouseapp)

    ronin-24204 (at lighthouseapp) September 25th, 2008 @ 04:23 PM

    Sorry, i cannot reproduce the warning in this moment but i found an article where explain that getBoxObjectFor() is deprecated in firefox 3. It works but throw a warning to the error console.

    "And now, getBoxObjectFor is being phased out, in two steps:

    1. It's being deprecated in Firefox 3. Any attempts to use it will throw a warning to the console (but continue to work).
    2. It will be removed, completely, in the next version of Firefox. "

    Here the article: http://ejohn.org/blog/the-getbox...

  • Tom Occhino

    Tom Occhino September 25th, 2008 @ 04:34 PM

    • State changed from “hold” to “invalid”

    The technique we are using here is called Object-detection. Instead of parsing navigator strings to determine the browser the user is using, we do detection based on the capabilities of the browser.

    You don't see the warning anywhere in MooTools code because we never call getBoxObjectFor, we are simply testing for it's existence to determine the version of the gecko engine (Firefox) the user is using.

    cool?

  • Ally

    Ally March 5th, 2009 @ 09:31 PM

    • Assigned user changed from “Valerio” to “Tom Occhino”

    Sorry to re-open this one, just a quick question...

    "You don't see the warning anywhere in MooTools code because we never call getBoxObjectFor, we are simply testing for it's existence"

    "It will be removed, completely, in the next version of Firefox."

    Those two quotes suggest that MooTools will not be able to correctly identify the next version of Firefox? I, for one, am getting the Firefox warning about using the method when I'm playing around with browser detection. It sounds like it should be as simple as changing to use getBoundingClientRect(), though.

  • Ally

    Ally March 5th, 2009 @ 09:32 PM

    • Assigned user changed from “Tom Occhino” to “Valerio”

    Woopsie, didn't mean to reassign that, I figured it would be relevant for who I was replying to...

  • ultima

    ultima June 2nd, 2009 @ 04:00 AM

    Hi, I was just wondering why this bug is still marked as invalid. If plans to fix it are deferred until a stable version of Firefox comes out that no longer exposes getBoxObjectFor outside of XUL, then that's understandable, but I'm not sure why this bug should still be considered invalid.

    This is a very real problem, as the relevant BugZilla ticket as linked to in John Resig's blog post indicates that this Gecko bug of exposing getBoxObjectFor outside of XUL has been fixed since 3/30/09. That means even attempting to detect getBoxObjectFor would result in the browser returning undefined. You can verify this simply by testing MooTools under Firefox v3.6a1.

  • Christoph Pojer

    Christoph Pojer October 31st, 2009 @ 09:35 AM

    • State changed from “invalid” to “resolved”

    We have resolved this issue in MooTools 1.2.4 and MooTools 1.1.2: http://mootools.net/blog/2009/10/19/mootools-1-2-4/

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages