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

Page: Add option to not perform .enhanceWithin() #7416

Closed
gabrielschulhof opened this Issue May 22, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@gabrielschulhof
Contributor

gabrielschulhof commented May 22, 2014

This will help improve performance, and it will help support advanced users who are aware of the performance implications of autoinit.

@gabrielschulhof gabrielschulhof modified the milestones: 1.5 - 2.0, 1.6.0, 1.5.0 May 22, 2014

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof May 22, 2014

Contributor

We currently call .enhanceWithin() unconditionally on _create(). This is bad, because users have no way of preventing the page widget during its instantiation from traversing the DOM in search of widgets. With this option in place, and defaulting to true for backcompat, advanced users can instantiate their widgets manually.

Adding this option does not require a lot of work, because we don't need to deal with _setOptions(), since the value of the option affects only the behaviour of _create() and has no further effect.

Contributor

gabrielschulhof commented May 22, 2014

We currently call .enhanceWithin() unconditionally on _create(). This is bad, because users have no way of preventing the page widget during its instantiation from traversing the DOM in search of widgets. With this option in place, and defaulting to true for backcompat, advanced users can instantiate their widgets manually.

Adding this option does not require a lot of work, because we don't need to deal with _setOptions(), since the value of the option affects only the behaviour of _create() and has no further effect.

@gabrielschulhof gabrielschulhof self-assigned this Jan 5, 2015

gabrielschulhof added a commit to gabrielschulhof/jquery-mobile that referenced this issue Jan 5, 2015

kakul added a commit to kakul/jquery-mobile that referenced this issue Apr 14, 2015

Page: Add option enhance
Enhances the page only if the option is on, which, by
default, it is.

Fixes gh-7416
Closes gh-7897
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment