Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #58873, comment 3


Ignore:
Timestamp:
08/19/2025 10:21:04 AM (8 months ago)
Author:
jonsurrell
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58873, comment 3

    initial v1  
    33For what it's worth, I much prefer the [https://developer.wordpress.org/reference/hooks/script_module_data_module_id/ "pull" style of passing data that's used by script modules with the script_module_data_{$module_id} filter.] Some advantages:
    44
    5 - The browser does not evaluate the script contents _at all_ because it's not a JavaScript script tag.
    6 - The data is parsed and used _on demand_ when necessary by the script that requires it.
     5- The browser does not evaluate the script contents ''at all'' because it's not a JavaScript script tag.
     6- The data is parsed and used ''on demand'' when necessary by the script that requires it.
    77- No use of a shared global JavaScript namespace.
    88