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
The challenge here is that the function for creating elements lies within window.document, and it's a different object for every window. Elements from one window can't be transferred to another.
One option is to set the window based on the target element. We can get the window from the target element using this:
Another problem is components with dynamic elements that phase in and out of existence. Note that components don't use targeters. They just return dot syntax. One option here is to assign a window to the component before the builder is called. Then any new content generated by that component will use it's window. A component could potentially be used in multiple windows. Please test this before marking this as compete.
The text was updated successfully, but these errors were encountered:
Solution is you can pass a window object into the target, or as shown above, just choose a target node that's already on the target window. Scheduled to package with v6.
Users of the framework should be able to target other windows and write directly to them.
Something like this would be nice
The challenge here is that the function for creating elements lies within window.document, and it's a different object for every window. Elements from one window can't be transferred to another.
One option is to set the window based on the target element. We can get the window from the target element using this:
element.ownerDocument.defaultView || element.ownerDocument.parentWindow;
Another problem is components with dynamic elements that phase in and out of existence. Note that components don't use targeters. They just return dot syntax. One option here is to assign a window to the component before the builder is called. Then any new content generated by that component will use it's window. A component could potentially be used in multiple windows. Please test this before marking this as compete.
The text was updated successfully, but these errors were encountered: