4 msΒ·
HTML custom elements (basis for web components) are intended for things that should be added to DOM. Using it for any other purpose is probably a misuse.
by interlocutor 7y ago
HTML custom elements (basis for web components) are intended for things that should be added to DOM. Using it for any other purpose is probably a misuse.
- jjcm 7y agoIn my personal case I'm using it so the DOM is more literal as to what's happening on the page. I'm of the naive opinion that you should be able to read the DOM and have a general sense of what the site looks like. Since I'm making a single-page site that loads everything at once, I have a webcomponent based router that declaratively states what route will be active given the URL. For example: ππ’-ππππππ ππ’-πππππ(πππππππ="/ππππ") // ππππ ππππ ππππ ππ’-πππππ(πππππππ="/πππ π") // ππππ πππ π ππππ
- uryga 7y agonot sure what happened, but your code example is almost all tofu (unicode [X]) to me. looks like it's using characters like "mathematical monospace lowercase letter 'm'" etc edit: unidecoded: my-router my-route(pattern="/home") // some home page my-route(pattern="/news") // some news page