-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
In a Reddit post about a script failing to detect an element within a shadowroot, u/Speed43 suggested checking whether it was within an iframe.
I hadn't considered whether I could observe for selectors within an iframe but perhaps I should.
They mentioned needing to add the frame's URL in a @require, which may be prove a technical reason why it couldn't be accessed when passing in the DOM as the observationTarget. Then again, at first I didn't understand how ShadowRoot could be monitored by using Element.shadowRoot to traverse from the DOM to descendants of the ShadowRoot. It's also possible that the frame could be passed separately by the user.
Questions to answer:
- Are an iframe's descendants monitored by a MutationObserver observing its containing DOM?
- If not, can ObserverTracker set up a separate MutationObserver for an iframe in some manner similar to how I solved the ShadowRoot implementation?
- If not, can users use a second ObserverTracker to observe the DOM within an iframe, so I can at least document that as a usage scenario?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested