Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

appreciate your feedback for custom element diagram #183

Closed
AndyOGo opened this issue Jan 23, 2019 · 7 comments
Closed

appreciate your feedback for custom element diagram #183

AndyOGo opened this issue Jan 23, 2019 · 7 comments

Comments

@AndyOGo
Copy link

AndyOGo commented Jan 23, 2019

Hy,

I just released an adapted version of the interactive react lifecycle methods diagram for custom elements:
https://andyogo.github.io/custom-element-reactions-diagram/

If you have time, I would appreciate your feedback very much.

Personally I'm still concerned of how to express the non-determinisitic and integrity issues of custom element reactions, like it's documented in the spec itself in the example below:
https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-conformance

@TimvdLippe
Copy link
Contributor

This diagram seems fine to me. I am not sure what you mean with the non-determinism. There shouldn't be any in the specification.

It is unclear to me what the arrows/crosses mean. Maybe add a footnote that is referenced in the diagram describing that these methods can throw if certain properties are not met?

@AndyOGo
Copy link
Author

AndyOGo commented Jan 23, 2019

Thanks for your answer.

I am not sure what you mean with the non-determinism. There shouldn't be any in the specification.

I agree there shouldn't. But unfortunately the spec is fragile itself, like officially stated here (scroll down to example):

An element's connectedCallback can be queued before the element is disconnected, but as the callback queue is still processed, it results in a connectedCallback for an element that is no longer connected:

https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-conformance

@TimvdLippe
Copy link
Contributor

If you would like to propose changes to the specification to make it "less fragile", feel free to open an issue on https://github.com/search?q=org%3Awhatwg+label%3A%22topic%3A+custom%20elements%22+is%3Aopen

Since this particular diagram is fine from a polyfill-perspective, I am closing this issue. Any spec discussions should be held in the standards repository. Thanks for creating this diagram!

@AndyOGo
Copy link
Author

AndyOGo commented Jan 23, 2019

Thanks.

Well, this diagram shall help people to understand the upsides and downsides of custom elements.

I would really like to gather as much feedback as possible from people being actively involved within the custom elements community.

@TimvdLippe
Copy link
Contributor

This diagram helps, but I don't think the polyfill is the correct location to add this (as the polyfill is designed to go away and the diagram is not). Therefore, I would propose to add it to https://github.com/w3c/webcomponents or to for example MDN (https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements). That way, you will make sure the diagram remains useful and is placed in a frequently used document.

@AndyOGo
Copy link
Author

AndyOGo commented Jan 23, 2019

Thanks a lot for your help. I will do that :)

@AndyOGo
Copy link
Author

AndyOGo commented Feb 19, 2019

Alright, I made some updates:
https://andyogo.github.io/custom-element-reactions-diagram/

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

No branches or pull requests

2 participants