Skip to content

Remove conditional comments for Internet Explorer - #223

Open
menelaos wants to merge 3 commits into
yesodweb:postgresfrom
menelaos:remove-conditional-comments
Open

Remove conditional comments for Internet Explorer#223
menelaos wants to merge 3 commits into
yesodweb:postgresfrom
menelaos:remove-conditional-comments

Conversation

@menelaos

Copy link
Copy Markdown

I think the conditional comments for Internet Explorer can be removed from the template:

  • Conditional comments have been removed in IE10
  • Internet Explorer itself has been deprecated
  • It's usually better to use feature detection anyway

I'd say that under normal circumstances there is no need to include this in new projects.

\<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
\<!--[if gt IE 8]><!-->
<html class="no-js" lang="en"> <!--<![endif]-->
<!doctype html>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the backslash in this line was redundant.


<script>
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/,'js');
document.documentElement.classList.replace("no-js", "js");

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Browser support for classList is good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant