Side navigation
#13743 closed feature (fixed)
Opened April 07, 2013 11:30AM UTC
Closed April 18, 2013 03:24AM UTC
Last modified June 05, 2013 05:49PM UTC
Remove jQuery.support.boxModel
Reported by: | m_gol | Owned by: | m_gol |
---|---|---|---|
Priority: | low | Milestone: | 1.10/2.0 |
Component: | support | Version: | 2.0b2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery.support.boxModel has been deprecated since 1.3 (!), is there anything stopping us from removing it?
Saves 23 bytes in the minified & gzipped code.
Attachments (0)
Change History (18)
Changed April 07, 2013 12:44PM UTC by comment:1
Changed April 07, 2013 12:53PM UTC by comment:2
It'll break compatibility with 1.9, though (in a very minor way, but still). I've read about soon 1.10 plans so I suspect there were some decision changes in the roadmap?
Changed April 08, 2013 04:51PM UTC by comment:3
Ref #13743. Remove support.boxModel, deprecated 1.3. Close gh-1230.
Changeset: 1233fc77883c26eeeea4847f9f0b90e07d189b90
Changed April 08, 2013 06:21PM UTC by comment:4
owner: | → m_gol |
---|---|
status: | new → assigned |
Changed April 08, 2013 06:25PM UTC by comment:5
milestone: | None → 1.10 |
---|
Changed April 13, 2013 11:18AM UTC by comment:6
priority: | undecided → low |
---|
Changed April 13, 2013 11:19AM UTC by comment:7
component: | unfiled → support |
---|
Changed April 16, 2013 11:54PM UTC by comment:8
milestone: | 1.10 → 1.10/2.0 |
---|
Changed April 18, 2013 03:24AM UTC by comment:9
resolution: | → fixed |
---|---|
status: | assigned → closed |
Landed in 1.x-master at https://github.com/jquery/jquery/commit/35784a824456bf87bbe2fadad2717ad4f4000d14
Changed June 01, 2013 03:10AM UTC by comment:10
Umm, this is just wrong!!
jQuery.support.boxModel was NOT deprecated in v1.3
jQuery.boxModel is what was deprecated in v1.3... http://api.jquery.com/jQuery.boxModel/
The jQuery.support() function with the boxModel test was never deprecated, and is in fact the example used to show how one uses jQuery.support() in your own API Documentation!!!
http://api.jquery.com/jQuery.support/
This needs to be corrected as jQuery.support.boxModel() is one of the new fallback methods developers are using to detect for old IE since $.browser is now gone!!!
Changed June 01, 2013 03:37AM UTC by comment:11
As the jQuery.support
documentation says:
Since jQuery requires these tests internally, they must be performed on every page load. Although some of these properties are documented below, they are not subject to a long deprecation/removal cycle and may be removed once internal jQuery code no longer needs them.
We have not used either boxModel
property for many releases.
Changed June 04, 2013 03:32PM UTC by comment:12
I definitely can't understand why $.support.boxModel has been removed in 1.10. Though this feature detection isn't used anymore in jQuery internal code, it still makes huge sense for user code, especially as the 1.x version remains for legacy browsers.
Changed June 04, 2013 04:18PM UTC by comment:13
_comment0: | jQuery never supported quirks mode. If you are using `.boxModel` you're already doing something that jQuery never supported. You can check `document.compatMode !== "BackCompat"` if you want to know you're in quirks. \ \ Would it help to have that in the jQuery Migrate plugin? \ → 1370362770937573 |
---|
jQuery never supported quirks mode. If you are using .boxModel
you're already doing something that jQuery never supported. You can check document.compatMode === "BackCompat"
if you want to know you're in quirks.
Would it help to have that in the jQuery Migrate plugin?
Changed June 04, 2013 05:20PM UTC by comment:14
_comment0: | @props \ I really don't understand what's the issue here. Are we supposed to support every little detail that has been introduced to jQuery codebase at any point in time? It's not feasible and it would seriously hamper any improvements. \ \ It's not that we cut out any significant feature, too. Come one, the whole `support.boxModel` definition was one line of code, is it that hard to replicate it in your code if you really need it? I bet 99% people using jQuery didn't use that option (which is a good practice if you ask me). → 1370366522971454 |
---|
@props
I really don't understand what's the issue here. Are we supposed to support every little detail that has been introduced to jQuery codebase at any point in time? It's not feasible and it would seriously hamper any improvements.
It's not that we cut out any significant feature, too. Come on, the whole support.boxModel
definition was one line of code, is it that hard to replicate it in your code if you really need it? I bet 99% people using jQuery didn't use that option (which is a good practice if you ask me).
Changed June 05, 2013 04:09PM UTC by comment:15
Thank you for your replies... I know of course this was not a key feature, and is easy to replace with the document.compatMode test. You may say all the developpers like you and me hate quirks mode, BUT unfortunately this is not always a choice. There are still many business apps to maintain that rely on old standards, and we can't help decide anything on this point. So yes, I often use .boxModel, as well as the (awful) $.browser... My aim is to be efficient, while keep on focusing on evolution, and that is your main idea too with the two branches. Imho the 1.x should then really keep this legendary efficiency...
Anyway, having it in the migrate plugin would be a good idea.
Thank you very much
Changed June 05, 2013 05:10PM UTC by comment:16
I tend to agree that if one of our goals with the Migrate plugin is to allow people to be ready to transition to 2.0 and otherwise warn about things we don't want people doing, warning when people access $.support in general, in addition to just boxModel, might be a good idea to add to Migrate.
Thoughts?
Changed June 05, 2013 05:38PM UTC by comment:17
I already created a ticket to add jQuery.support.boxModel
to Migrate this morning. https://github.com/jquery/jquery-migrate/issues/41
The problem with warning about any access to jQuery.support
is that we use it legitimately inside jQuery, and any warning coming from inside jQuery itself will cause problems as far as spurious messages and user confusion.
Eventually all those properties will be broken off into their corresponding modules and don't even need to be exposed, and many won't be run until they're needed. That can prevent some expensive at-ready-time reflows.
There is already a docs ticket to make the message about jQuery.support
more urgent. https://github.com/jquery/api.jquery.com/issues/315
Removing the jQuery.support
property is a possibility but would break code outside core that decided their own private feature detects should go there as well.
https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.support.js#L188
If we eliminated internal uses we could fully warn on *any* use of jQuery.support
and move the property to be handled and always warned by Migrate.
Changed June 05, 2013 05:49PM UTC by comment:18
Also, the jQuery Migrate plugin already *warns* about quirks mode. This new feature will generate a second warning about jQuery.support.boxModel
and also restore the setting so the old code continues to work to some extent, although it's hard to say how well since we don't test with quirks so behavior isn't guaranteed across versions.
Pull requests:
1.x-master: https://github.com/jquery/jquery/pull/1231
master: https://github.com/jquery/jquery/pull/1230