Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#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)

#1 @ocean90
12 years ago

  • Component General → Script Loader

Related: #22249

#2 @wonderboymusic
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.

This ticket was mentioned in ​Slack in #core by swissspidy. ​View the logs.


8 years ago

Note: See TracTickets for help on using tickets.