checks needed while adding type attribute in script tag

11 views
Skip to first unread message

ashi...@gdbtech.in

unread,
Jun 26, 2017, 2:48:12 PM6/26/17
to pagespeed-dev
I am working on this issue https://github.com/pagespeed/mod_pagespeed/issues/1207 .
I am checking whether pedantic filter enabled before adding type attribute.

In common_filter.cc file, function AddJsToElement, adds type attribute based on HTML5 version check. I am thinking of adding or condition(pedantic filter enabled check) to the same check. So if it not HTML5 or pedantic filter enabled, it will add type attribute.
Is this check appropriate ? or pagespeed will need to correctly detect if the browser will go into HTML5 mode.
Let me know your thoughts on this.

Thanks,
Ashish
Reply all
Reply to author
Forward
0 new messages