Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event: Warn about late use of $(window).on("load"...) #217

Closed
wants to merge 2 commits into from

Conversation

dmethvin
Copy link
Member

@dmethvin dmethvin commented Aug 5, 2016

Fixes #200

@mention-bot
Copy link

@dmethvin, thanks for your PR! By analyzing the annotation information on this pull request, we identified @markelog and @mgol to be potential reviewers

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 87.288% when pulling 1776e3d on dmethvin:200-lateload into 057e1f4 on jquery:master.

@dmethvin
Copy link
Member Author

dmethvin commented Aug 6, 2016

Coverage in iframe tests doesn't get counted, which explains the decrease here.

@@ -193,3 +193,9 @@ See jQuery-ui [commit](https://github.com/jquery/jquery-ui/commit/c0093b599fcd58
**Cause:** The code on the page has used the `jQuery.event.props` or `jQuery.event.fixHooks` data structures. These were used in previous versions to affect the properties that are copied from the native event to the jQuery event each time an event is delivered, but they had the potential to create performance issues. Versions of jQuery Mobile before 1.5 make use of this API and require jQuery Migrate to run properly.

**Solution:** The most popular use of these data structures are to add properties for touch or pointer events, and those properties are now supported by default with a newer high-performance approach in jQuery 3.0 that only retrieves the properties on first access. If you are using jQuery Mobile, check the [jquerymobile.com](https://jquerymobile.com) site for updates. If you are using plugins such as [pointerTouch](https://github.com/timmywil/jquery.event.pointertouch) or [touchHooks](https://github.com/aarongloege/jquery.touchHooks), simply remove them as they are no longer needed.

### JQMIGRATE: $(window).on('load'...) called after load event occurred
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ should be jQuery for consistency with other messages. Use of $ is okay in the descriptions though.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 87.288% when pulling 7f1ff0e on dmethvin:200-lateload into 057e1f4 on jquery:master.

@mgol
Copy link
Member

mgol commented Nov 14, 2016

LGTM

@mgol mgol added this to the 3.1.0 milestone Nov 14, 2016
@dmethvin dmethvin closed this in 7cbf691 Nov 28, 2016
@dmethvin dmethvin deleted the 200-lateload branch September 12, 2017 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants