-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support context from custom element ancestors #10
Comments
Great example of a use case that I’d like to reproduce purely in web component form, where each Svelte component ( (thanks to Amir at SO for providing this REPL) |
…instantiating them outside of their context (before it's parent has initialized it or not inside of parent).
Note: Working on this may resolve #12 due to the complexities involving context and rendering the tree from the top down. This is because it may make sense to wait and instead queue component rendering until the next animation frame when we we have enough custom elements initialized (or constructed) to justify traversing the DOM to render in order (to support said context). |
…ment tag definitions) to facilitate testing of context.
…hadow DOM rendering, ensuring components are rendered/initialized from the top down (at least in light DOM, WIP for shadow).
…re querySelectorAll() for compatibility across both light DOM and shadow DOM (since that always returns document order, per spec). Cleaning up some console logs and debug code.
…te-retag-render', as it's only necessary for render. Cleans final rendered HTML (leaves no extra attribs behind).
…up unnecessary mutex/semaphor for requestAnimationFrame. Refactoring queueForRender() for simplicity and reducing redundancy there, too.
…ll need to optimize heavily (without breaking context).
…an up color vars for consistency.
…nt re-instantiating every component.
…ng of element attributes to component props without having to instantiate it any extra times (which not only can break context but also is likely unexpected in many situations). So, 1.) We can pass case-sensitive props at FIRST instantiation and then 2.) Retain them for mapping back if/when attributeChangedCallback() is called later.
…to ensure immediate results. Also ensuring we wrap with <svelte-retag> for now in Shadow DOM tests instead of <div>; it was replaced since it potentially adds extra formatting that we may not want.
…mock that ensures each queued callback runs to completion AND runs in sequential order (i.e. preventing nesting). Found quirk after first unit test made for validating context that couldn't be resolved (parent didn't complete initialization before child attempted to render).
Implemented in |
Stub for an issue originally created by @Vanillabacke, see crisward/svelte-tag#8
The text was updated successfully, but these errors were encountered: