Support for Webcomponents' CustomElements?

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

User avatar
pale guru
Moonbather
Moonbather
Posts: 61
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
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
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.

New Tobin Paradigm

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

User avatar
pale guru
Moonbather
Moonbather
Posts: 61
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: 35405
Joined: 2011-08-28, 17:27
Location: Motala, 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 :)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked