[wp-trac] [WordPress Trac] #48654: Consider a solution/endpoint to lazy-load scripts and styles

WordPress Trac noreply at wordpress.org
Thu Jul 23 07:31:52 UTC 2020


#48654: Consider a solution/endpoint to lazy-load scripts and styles
------------------------------+-----------------------------------
 Reporter:  youknowriad       |       Owner:  spacedmonkey
     Type:  task (blessed)    |      Status:  assigned
 Priority:  high              |   Milestone:  5.6
Component:  REST API          |     Version:  4.7
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  javascript, rest-api
------------------------------+-----------------------------------

Comment (by LewisCowles):

 There is a little work on this from a plugin I've recently been
 "adjusting".

 Problems seem to include that actual DOM can be generated that may be
 presentational rather than just styling and scripting / interactivity.

 https://github.com/CODESIGN2/gutenberg-shortcode-preview-block

 The bones of the work were from the WordPress team before Gutenberg became
 core, but barring some minor changes to JS API, the PHP side has not
 changed, to the point header and footer are misleadingly called `js` and
 `style`

 Perhaps the HTML clean up (I think it may be called kses) could be used
 with a different rule-set to clear out non JS and non-style / link tags?

 That (along with how it can put itself within a post) and the Gutenberg
 side of it may be of use, since I've removed the plugin from the
 directory, but found myself tinkering since.

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


More information about the wp-trac mailing list