[wp-trac] [WordPress Trac] #48880: Using JSON.parse instead of an actual object literal when localizing scripts

WordPress Trac noreply at wordpress.org
Thu Dec 5 09:58:15 UTC 2019


#48880: Using JSON.parse instead of an actual object literal when localizing
scripts
---------------------------+--------------------------------------
 Reporter:  naxvog         |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  5.3
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  javascript, performance
---------------------------+--------------------------------------

Comment (by gziolo):

 Replying to [ticket:48880 naxvog]:
 > Added a diff with additional changes to the block editor init script
 using the same method.

 Now that I checked the source of the diff, I think the part updating the
 block editor makes sense. As noted in my previous comment, we should also
 do the same for the preloading middleware for REST API calls.

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


More information about the wp-trac mailing list