Support for Webcomponents' CustomElements?

Discussions about the development and maturation of the Unified XUL Platform (UXP).
Warning: may contain highly-technical topics.

Moderator: trava90

User avatar
pale guru
Moongazer
Moongazer
Posts: 7
Joined: 2021-11-06, 11:10
Location: Tyskland

Support for Webcomponents' CustomElements?

Unread post by pale guru » 2021-11-06, 11:58

Recently I came across a few sites that use a relatively new feature (or toy, lol, as you wish) of Webcomponents' CustomElementRegistry. In example a word count class is added to the paragraph HTML tag.

When a website calls window.customElements (without the useful try…catch of course), Palemoon (29.4.1) displays at the console:

TypeError: window.customElements is undefined

Checking about:config in Palemoon, there is a setting for dom.webcomponents.enabled (defaults to false). Setting this to true just vanishes the TypeError.

This demo https://webkit.org/wp-content/uploads/c ... -demo.html should show a progress bar, instead a “ReferenceError: customElements is not defined” is thrown: custom-element-demo.html:34:1

Since this CustomElements stuff was introduced officically in FF63, is this going to be a backported to Palemoon some day, or is there any fallback in Palemoon?

NB: There might be some useful cases for CustomElements, but i fear it will end up just like most other features – motto: it is new!1! so we have to use it on our new site! Like, so, class coffee_machine extends paragraph_tag… Half of the Javascript forest could be lumbered for the use of HTML5 elements (fade in-out-over, resize images), but Javascript seems modern and blown up…

vannilla
Board Warrior
Board Warrior
Posts: 1818
Joined: 2018-05-05, 13:29

Re: Support for Webcomponents' CustomElements?

Unread post by vannilla » 2021-11-06, 13:48

Read the forum, it's been explained in details in multiple threads.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 10644
Joined: 2012-10-09, 19:37
Location: The Seriphia Galaxy

Re: Support for Webcomponents' CustomElements?

Unread post by New Tobin Paradigm » 2021-11-06, 17:15

pale guru wrote:
2021-11-06, 11:58
[...]
That's what you get for being a fake guru. Know your role.

viewtopic.php?f=62&t=27497#p221033
Better that a 100 probably guilty people die then one of them get a clean shot on me.
Image

User avatar
pale guru
Moongazer
Moongazer
Posts: 7
Joined: 2021-11-06, 11:10
Location: Tyskland

Re: Support for Webcomponents' CustomElements?

Unread post by pale guru » 2021-11-07, 02:37

What a warm welcome, searching for CustomElements showed no results. But thanks for the link.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 31077
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Support for Webcomponents' CustomElements?

Unread post by Moonchild » 2021-11-07, 04:37

pale guru wrote:
2021-11-07, 02:37
searching for CustomElements showed no results.
search.php?keywords=CustomElements
Pale Moon Forum wrote:Search found 60 matches: CustomElements

Searched query: customelements
Off-topic:
pale guru wrote:
2021-11-07, 02:37
What a warm welcome
It's the kind of response you invite by choosing that kind of username and asking a dumb question that has been answered many times over on the forum. You can only blame yourself for that one :)
"Remember, only you can prevent Earth's destruction by spelling Pale Moon with a space." -- Athenian200
Image

Post Reply