You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
It would be nice to apply context for jQuery mobile or reuse jQuery mobile object to initialize jQuery mobile on other document (ie. inside iframe).
Use case: Let say some one have a jQuery mobile application that is inserted in a webpage as a widget by an iframe. Application script loader can detect if ther are any of required libraries on parent page and inject them to App's iframe document so there will be no need to attach jQuery mobile twice (one on parents webpage and second on App page inside an iframe).
Currently builded jQuery mobile script does not allow to "clone" jQuery mobile object to other document nor to initilaize a second instance of jQuery mobile app since it is bound to one document.
For instance, jQuery can be "reused" since it can have given context like: $("#myId", iframe.contentDocument);
The text was updated successfully, but these errors were encountered:
This is an excellent point. We make far too much use of document and window in the library. It's part of our design limitations.
In contrast, the jQuery UI widget factory, when used correctly, explicitly provides each widget instance with its window/document context. So, we can either make use of this facility in future versions of jQuery Mobile, or we can at least thread the context awareness you request into the library by some other means.
Either way, this is a fairly involved task. I wouldn't consider it a feature request though, because it is in some sense an architectural flaw of the library. Nevertheless, whether we qualify this as a feature request or not is up for some discussion.
Thanks for the feature request. We discussed it during our weekly meeting. To implement something like this in navigation (managing multiple history stacks) is very complicated. There is still a lot of work to be done on navigation before we can even think of implementing this and there is a big chance we decide not to do it because it is too complex.
I am closing this ticket as feature request. Thanks for your contribution!
It would be nice to apply context for jQuery mobile or reuse jQuery mobile object to initialize jQuery mobile on other document (ie. inside iframe).
Use case: Let say some one have a jQuery mobile application that is inserted in a webpage as a widget by an iframe. Application script loader can detect if ther are any of required libraries on parent page and inject them to App's iframe document so there will be no need to attach jQuery mobile twice (one on parents webpage and second on App page inside an iframe).
Currently builded jQuery mobile script does not allow to "clone" jQuery mobile object to other document nor to initilaize a second instance of jQuery mobile app since it is bound to one document.
For instance, jQuery can be "reused" since it can have given context like:
$("#myId", iframe.contentDocument);
The text was updated successfully, but these errors were encountered: