Skip to content

State of polyfills and browser support #5447

@mrxz

Description

@mrxz

Description:
There are several polyfills present in A-Frame, many of which are already quite dated. Several of them can probably be removed, but it mostly depends on the relevancy of the (old) browsers/devices that are still intended to be supported. AFAIK there is no set browserlist, but that might be a good idea going forwards.

Here's an overview of the polyfills:

Polyfill API(s) Caniuse % Notes
@ungap/custom-elements Custom Elements 78.83% + 18.5% = 97.33% only for IE (Safari doesn't support customized built-in elements, but A-Frame does not require this)
custom-event-polyfill CustomEvent 98.05% + 0.49% = 98.54% only for IE 9+
object-assign Object.assign 96.61% ponyfill, only for IE
present Performance.now 97.22% ⚠️ Also polyfilled by rStats.js
promise-polyfill Promise 97.89% only for IE
webvr-polyfill WebVR 2.92% + 2.49% = 5.41% contrary to what caniuse reports, FF has it disabled by default and requires specific flag to enable

Three.js has already dropped support for IE 11, so simply following suit, virtually all above mentioned polyfills can be removed as well. If a user does want to go through the pain of targetting IE 11, they can always load the needed polyfills themselves.

As for WebVR (polyfill), it would be nice to be able to get rid of it. There's quite a bit of duplicate code logic/paths due to supporting both WebVR and WebXR. I wouldn't be surprised if WebVR support is (subtly) broken in places.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions