Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #12009, comment 140


Ignore:
Timestamp:
06/24/2023 09:07:39 AM (12 months ago)
Author:
shawfactor
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12009, comment 140

    initial v1  
    1 What several commenters are missing is that wp_register_script is WordPress standard and the defer and async attributes are web standards so it is important that wordpress follows the web standard.
     1What several commenters are missing is that wp_register_script is a WordPress standard whilst the defer and async attributes are web standards so it is important that WordPress follows the web standard.
    22
    3 Those that saying that there are easier ways to includes script if you don't need dependencies are missing the a major point in that wp_register_script allows other plugins to understand the script exists. This can ensure scripts not added twice but for instance I also use it in a service worker to ensure that the script is pre cached.
     3Those that saying that there are easier ways to includes script if you don't need dependencies are missing a major point in that wp_register_script allows other plugins to understand the script exists. This can ensure scripts are not added twice but has other applications. For instance I also use it in a service worker to ensure that all registered scripts is cached.
    44
    55This will become increasingly important as vanilla javascript has already rendered libraries like jquery redundant.