#29893 closed enhancement (maybelater)
Scripts output syntax enhancement for HTML5
| Reported by: | poxtron | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Script Loader | Version: | 4.0 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Hi there, I was wondering why enqueued scripts have the 'text/javascript' type when its no longer necesary in HTML5.
Found the exact part on the code that needs to change, making a filter or using an action is not posible, is on
wp-includes/class.wp-scripts.php line 142 and 144
the only thing thats needs to be done there is remove type='text/javascript' and that's it.
Will not affect existing sites, but it will make the code look more poetic. ;)
Change History (3)
#2
@
12 years ago
- Milestone Awaiting Review
- Resolution → maybelater
- Status new → closed
The "type" attribute is required in HTML 4, but optional in HTML5. HTML5 is opt-in via DOCTYPE, someone correct me if I am wrong.
Thanks for the report.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Related: #22249