Make WordPress Core


Ignore:
Timestamp:
08/28/2025 02:44:30 PM (15 months ago)
Author:
jonsurrell
Message:

Script Loader: Remove "inline:" prefix from sourceURL.

The prefix may negatively impact some APIs such as the Long Animation Frames API.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/9655.

Follow-up to [60685].

Props jonsurrell, swissspidy.
Fixes #63887.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/dependencies/styles.php

    r60685 r60686  
    151151                $expected .= "<style id='handle-inline-css' type='text/css'>\n";
    152152                $expected .= "$style\n";
    153                 $expected .= "/*# sourceURL=inline:handle-inline-css */\n";
     153                $expected .= "/*# sourceURL=handle-inline-css */\n";
    154154                $expected .= "</style>\n";
    155155
    … …  
    181181                $expected .= "<style id='handle-inline-css' type='text/css'>\n";
    182182                $expected .= "$style\n";
    183                 $expected .= "/*# sourceURL=inline:handle-inline-css */\n";
     183                $expected .= "/*# sourceURL=handle-inline-css */\n";
    184184                $expected .= "</style>\n";
    185185
    … …  
    277277                $expected .= "$style1\n";
    278278                $expected .= "$style2\n";
    279                 $expected .= "/*# sourceURL=inline:handle-inline-css */\n";
     279                $expected .= "/*# sourceURL=handle-inline-css */\n";
    280280                $expected .= "</style>\n";
    281281
    … …  
    303303                $expected .= "<style id='handle-inline-css' type='text/css'>\n";
    304304                $expected .= "$style\n";
    305                 $expected .= "/*# sourceURL=inline:handle-inline-css */\n";
     305                $expected .= "/*# sourceURL=handle-inline-css */\n";
    306306                $expected .= "</style>\n";
    307307
    … …  
    337337<style id='handle-inline-css' type='text/css'>
    338338a { color: blue; }
    339 /*# sourceURL=inline:handle-inline-css */
     339/*# sourceURL=handle-inline-css */
    340340</style>
    341341<![endif]-->
    … …  
    369369                $expected .= "<style id='handle-three-inline-css' type='text/css'>\n";
    370370                $expected .= "$style\n";
    371                 $expected .= "/*# sourceURL=inline:handle-three-inline-css */\n";
     371                $expected .= "/*# sourceURL=handle-three-inline-css */\n";
    372372                $expected .= "</style>\n";
    373373
    … …  
    652652<style id="# test/</style> #-inline-css" type="text/css">
    653653custom-el { content: "ok"; }
    654 /*# sourceURL=inline:%23%20test%2F%3C%2Fstyle%3E%20%23-inline-css */
     654/*# sourceURL=%23%20test%2F%3C%2Fstyle%3E%20%23-inline-css */
    655655</style>
    656656
Note: See TracChangeset for help on using the changeset viewer.