Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when used tied element within shadowRoot within custom element - no updates seen #3

Closed
gullerya opened this issue Apr 3, 2017 · 3 comments
Assignees

Comments

@gullerya
Copy link
Owner

gullerya commented Apr 3, 2017

Reproduction:

  1. create Tie
  2. create custom element with shadow DOM
  3. create within this element few elements tied to the Tie from (1)
  4. elements are not updated

Expectation: elements tied and found within the shadow DOM should be a valid players in the tying game

@gullerya gullerya self-assigned this Apr 3, 2017
@gullerya
Copy link
Owner Author

Not sure if i'd like to wait for resolution/implementation of observability of shadow DOM attachment (see here) or implement something hackish there...
Currently waiting to see the plans for DOM 4.1

@gullerya
Copy link
Owner Author

Looks like there should and would be another approach - actually a better one.

If we'd think micro-front-end, and I am thinking this way :), actually we we would NOT like the DataTier to observe and manage Shadow DOM. In the same manner, we would even not like to observe and manage the internal document of an iframes.

Those should be considered as a shadowed areas, which, if needed, should bring their own instance of the DataTier and do the whole tying of their own scope by themselves. This will effectively allow us to maintains each such a component, be it custom element with its own Shadow DOM or an iFrame, as a micro-front-end, self contained, standing alone and not aware of the incorporating application and its frameworks, nor influencing that incorporating application be self.

gullerya added a commit that referenced this issue Jun 28, 2019
…ontend development design patterning (based on shadow DOM and iframe)
gullerya added a commit that referenced this issue Jun 28, 2019
…ontend development design patterning (based on shadow DOM and iframe)
@gullerya
Copy link
Owner Author

As of now, the solution is to use API DataTier.addRootDocument(shadowRoot), in the constructor of the custom element (or elsewhere) and remove this root in the disconnectedCallback by DataTier.removeRooDocument(shadowRoot).

This is an experimental approach, which is based on the assumption that there will be no automatic intrusive scan of custom elements / iframes.
I'll be using this approach myself to see if it may be implemented otherwise in a more convenient way.

Released in 1.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant