#60348 closed defect (bug) (fixed)
Script Modules API: Add import map polyfill for older browsers.
Reported by: | cbravobernal | Owned by: | gziolo |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Script Loader | Keywords: | has-patch has-unit-tests commit add-to-field-guide |
Focuses: | Cc: |
Description (last modified by )
Add a polyfill to make import maps compatibles with Safari versions under 15.
Syncs the changes from https://github.com/WordPress/gutenberg/pull/58263 to core.
Adds a polyfill to make import maps compatible with Safari old versions (under 15).
Trac ticket: https://core.trac.wordpress.org/ticket/60348
Change History (19)
This ticket was mentioned in PR #5947 on WordPress/wordpress-develop by @cbravobernal.
10 months ago
#1
- Keywords has-patch added
#2
@
10 months ago
This looks to be related to a feature added in 6.5. We generally only backport fixes for bugs introduced during that release. Why do you think it should be backported?
#3
@
10 months ago
- Summary changed from Backport: Add import map polyfill for modules. to Add import map polyfill for modules.
With backport I meant moving code that has been in Gutenberg to Core, in 6.5.
At least we call them backports in the sync issue:
https://github.com/WordPress/gutenberg/issues/57959
If it has a different meaning in Core, I will change the title.
Modules will be available in 6.5, and would be cool to have them also working in old Safari versions.
Thanks for the info!
#4
@
10 months ago
- Component changed from General to Script Loader
- Milestone changed from Awaiting Review to 6.5
Thanks for the clarification. A backport means moving from one branch to another in core.
Adjusting the milestone and component.
@luisherranz commented on PR #5947:
10 months ago
#6
I requested changes in the Gutenberg's PR:
@cbravobernal commented on PR #5947:
10 months ago
#7
#8
@
10 months ago
- Summary changed from Add import map polyfill for modules. to Script Modules API: Add import map polyfill for older browsers.
10 months ago
#9
Code-wise it seems to be ready to go. Do we have unit tests covering other polyfills? We could verify if the script prints when there are items in the import map.
@cbravobernal commented on PR #5947:
10 months ago
#11
Code-wise it seems to be ready to go. Do we have unit tests covering other polyfills? We could verify if the script prints when there are items in the import map.
I will take a look at it, if not, I will check if can add unit tests to cover them.
#13
@
10 months ago
- Owner set to gziolo
- Resolution set to fixed
- Status changed from new to closed
In 57492:
10 months ago
#14
Committed with https://core.trac.wordpress.org/changeset/57492.
#17
@
7 months ago
Was this specifically added for Safari < 15? Do we even support that?
As far as I remember it could be tested in Safari 14 but the same issue existed for other browsers as listed in https://caniuse.com/mdn-html_elements_script_type_importmap. The browser support is at 90% overall, but I'm not entirely sure how to compare that with what WordPress officially supports.
#18
@
7 months ago
The browserslist website makes it easy to compare that. I just opened #60970 because of that.
#19
@
7 months ago
That would be the query with the browsers WP supports:
https://browsersl.ist/#q=%3E1%25%2C+last+1+Android+versions%2C+last+1+ChromeAndroid+versions%2C+last+2+Chrome+versions%2C+last+2+Firefox+versions%2C+last+2+Safari+versions%2C+last+2+iOS+versions%2C+last+2+Edge+versions%2C+last+2+Opera+versions
It looks like we don't need the polyfill for the import map, taking into account the list of currently supported browsers.
Trac ticket: https://core.trac.wordpress.org/ticket/60348