Changes between Initial Version and Version 1 of Ticket #12009, comment 140
- Timestamp:
- 06/24/2023 09:07:39 AM (16 months ago)
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.1 What 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. 2 2 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 precached.3 Those 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. 4 4 5 5 This will become increasingly important as vanilla javascript has already rendered libraries like jquery redundant.