Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

After merging 4113734, I discover that documentElement can be on the …

…document or the window. Added code to handle that properly.
  • Loading branch information...
commit da2a5439422c8f738a91890c709466847aa515a4 1 parent 568e63f
Wesley Workman authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/index.rhtml
View
8 lib/index.rhtml
@@ -8,14 +8,18 @@
# See the comments in this file for more information on what you can
# change.
-%>
-<!doctype html>
+<!DOCTYPE html>
<html<% unless @content_for_html5_manifest.blank? %> manifest="manifest.appcache"<% end %> class="no-js" lang="<%=language%>">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge<%= config.chrome_frame ? ',chrome=1' : '' %>" >
<script>
var SC_benchmarkPreloadEvents = { headStart: new Date().getTime() };
- window.documentElement.className = window.documentElement.className.replace(/(^|\s)no-js(\s|$)/, '$1js$2');
+ var docElem = window.documentElement || document.documentElement;
+ if(docElem) {
+ docElem.className = docElem.className.replace(/(^|\s)no-js(\s|$)/, '$1js$2');
+ docElem = null;
+ }
</script>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" >
Please sign in to comment.
Something went wrong with that request. Please try again.