Make WordPress Core


Ignore:
Timestamp:
08/28/2025 02:44:30 PM (12 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/wpLocalizeScript.php

    r60685 r60686  
    5757                $output = get_echo( 'wp_print_scripts' );
    5858
    59                 $expected  = "<script id=\"test-script-js-extra\">\nvar testData = {\"\\u003C!--\":\"\\u003Cscript\\u003E\"};\n//# sourceURL=inline:test-script-js-extra\n</script>\n";
     59                $expected  = "<script id=\"test-script-js-extra\">\nvar testData = {\"\\u003C!--\":\"\\u003Cscript\\u003E\"};\n//# sourceURL=test-script-js-extra\n</script>\n";
    6060                $expected .= "<script src=\"{$base_url}\" id=\"test-script-js\"></script>\n";
    6161
Note: See TracChangeset for help on using the changeset viewer.