[wp-trac] [WordPress Trac] #58632: Add support for 'async' and 'defer' loading to script that use inline scripts.
WordPress Trac
noreply at wordpress.org
Mon Nov 27 20:36:25 UTC 2023
#58632: Add support for 'async' and 'defer' loading to script that use inline
scripts.
-------------------------------+--------------------------
Reporter: joemcgill | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Script Loader | Version:
Severity: normal | Resolution: maybelater
Keywords: needs-patch close | Focuses: performance
-------------------------------+--------------------------
Comment (by westonruter):
Replying to [comment:4 JG Visual]:
> I still have concerns though that the vast majority of developers will
end up without the best solution. [...] I only learned what the issue was
by diving into the Core PHP. While some developers might do that, many
likely won't. ΒΆ If this won't be supported, should we at least update the
documentation for the related functions to note the limitations? We could
also output a message in debug.log, but that might be overkill.
Where do you think this documentation would best live given your
experience as a developer who just encountered this issue? You found it by
digging into core. We do have the restriction on inline after scripts
[https://make.wordpress.org/core/2023/07/14/registering-scripts-with-
async-and-defer-attributes-in-
wordpress-6-3/#:~:text=factors%20warrant%20it.-,Inline%20scripts,-There%20are%20some
documented in a Make/Core post].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58632#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list