WebPlatformTest / HTML5test

How well does your browser support HTML5?
https://html5test.com
MIT License
995 stars 193 forks source link

Incorrect check performed for Custom Elements (tests for v0, not v1) #552

Open padraig-ohiceadha opened 6 years ago

padraig-ohiceadha commented 6 years ago

The test for Custom Elements (in the Web Components section) is outdated, it checks for document.registerElement which is deprecated (it was defined for Custom Elements V0). For Custom Elements V1 : / custom elements /


        function (results) {
            results.addItem({
                key: 'components.custom',
                passed: 'registerElement' in document
            });
        },

This has been superseded bu customElements.define ([https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-define]).

I believe the test should be ... / custom elements /

    function (results) {
        results.addItem({
            key: 'components.custom',
            passed: (window.customElements !== undefined)  && 'define' in window.customElements
        });
    },

...

King2500 commented 4 years ago

Maybe that's the reason why MS Edge v80 (Chromium) shows it's not supporting, while Google Chrome (v79) shows support for it....?

According to MS Edge Platform Status it should show as supported: https://developer.microsoft.com/en-us/microsoft-edge/platform/status/customelements/?q=custom

padraig-ohiceadha commented 4 years ago

Most likely. It's also why the test reports that Firefox doesn't support custom elements also. And the same for Safari. And Chrome should soon also start reporting that it doesn't support custom elements also while the test remains a test for the deprecated Custom Elements v0 as support for Custom Elements v0 is being removed from Chrome in M80, due for release in February. See Chrome Status Custom Elements v0

niutech commented 1 year ago

This has been fixed in my HTML5Test fork.