Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Marionette and shadow DOM

55 views
Skip to first unread message

Yura Zenevich

unread,
Sep 15, 2015, 11:27:37 AM9/15/15
to dev-gaia
Hi people of Gaia,

A quick update about marionette and the way it operates on elements that are part of the ShadowDOM. 

Marionette JS client now supports stepping in and out of ShadowRoot similar to how it performs navigation to and from frames. There’s no need any more to run JS script on the marionette server side to manipulate or get something out of ShadowDOM. See example from the integration test:


Cheers,

Yura

Hubert Figuière

unread,
Sep 16, 2015, 11:25:54 AM9/16/15
to Yura Zenevich, dev-gaia
That's great.

I have one major hurdle / question that I don't find a solution in
reading the inline doc or the source code.

How do you move out of the shadowroot?


Hub

Yura Zenevich

unread,
Sep 16, 2015, 1:59:24 PM9/16/15
to dev-gaia, Hubert Figuière, dev-...@lists.mozilla.org
Ah, so the way you get out of it is by just calling:

client.switchToShadowRoot() with no arguments,  sorry, I should’ve mentioned it. It will either step into parent shadowRoot (if it’s nested) or into the main content.

Yura
0 new messages