Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Need a way to tell the framework not to enhance any markup in a specific container #3154
As of jQuery Mobile 1.0, the entire markup within a page is scanned for elements to be enhanced. This is problematic for 3rd party widgets/libraries that don't want anybody enhancing their markup or attaching behavior. We need some data-* attribute that we can place on an element container that tells the framework not to enhance anything inside it.
There is a potential performance problem here since this means all components that do enhancement must first look up the ancestor hierarchy to see if the element they are about to enhance falls under one of these special containers. @toddparker and I were discussing this and he suggested that perhaps we only pay this cost if a configuration flag is turned on ... that is support for this special attribute would only be available if the user knowingly turned it on and was willing to pay the price. When implementing this feature, keep in mind that we may want to avoid using $.fn.closest() and instead crawl the ancestor hierarchy manually since it is much faster.
So I stopped to think about making this alteration to the various
Instead I've added
I'm going under the assumption that I should add these to all the callsites of all the plugins internally because these data-enhance false containers could live inside widget markup that might contain something that requires