[wp-trac] [WordPress Trac] #49360: Scripts: Add polyfill for window.URL

WordPress Trac noreply at wordpress.org
Tue Mar 3 16:53:46 UTC 2020


#49360: Scripts: Add polyfill for window.URL
---------------------------+-------------------------
 Reporter:  aduth          |       Owner:  aduth
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:  5.4
Component:  Script Loader  |     Version:  trunk
 Severity:  normal         |  Resolution:  fixed
 Keywords:  has-patch      |     Focuses:  javascript
---------------------------+-------------------------
Changes (by jorgefilipecosta):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47416" 47416]:
 {{{
 #!CommitTicketReference repository="" revision="47416"
 Scripts: Use core-js url as polyfill for window.URL.

 URL polyfill from the polyfill-library library is not spec-conformant, in
 a way which negatively impacts its usability for pending revisions to the
 block editor. Specifically, there were revisions to the implementation of
 the wp-url script to detect URL validity by relying on thrown errors from
 the URL constructor, but this specific behavior is not implemented in this
 version of the polyfill.
 There was another issue in r47238, which is that the test used to check
 whether the polyfill should be included is not accurate. This commit uses
 a different check and fixes the issue.

 Props aduth.
 Fixes: #49360.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49360#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list