#29893 closed enhancement (maybelater)
Scripts output syntax enhancement for HTML5
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Script Loader | Keywords: | |
Focuses: | Cc: |
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
@
10 years ago
- Milestone Awaiting Review deleted
- Resolution set to maybelater
- Status changed from new to 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.
This ticket was mentioned in Slack in #core by swissspidy. View the logs.
7 years ago
Note: See
TracTickets for help on using
tickets.
Related: #22249