Skip to content

Stop overwriting native implementation while loading the polyfill #71

@fabon-f

Description

@fabon-f

For now, importing the polyfill globally via temporal-polyfill/global overwrites globalThis.Temporal and other APIs.

https://github.com/fullcalendar/temporal-polyfill/blob/bc1baf3875392ecd8522d40e7eecb55fa582808c/packages/temporal-polyfill/src/global.ts

As Firefox will ship Temporal in next month and this polyfill follows latest stable spec, it would be better that the polyfill doesn't overwrite native implementation if exists.

https://groups.google.com/a/mozilla.org/g/dev-platform/c/RtsRo93ygO4/m/2YzM42GUBwAJ

Perhaps it's still early to do that, because the spec for non-ISO calendars (Intl era and monthCode Proposal) is in progress and not yet stable. It depends on which level of spec-compliance this polyfill targets on, I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions