]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
IE10 Mobile viewport bug workaround: document.querySelector('head') => document.head 18095/head
authorChris Rebert <code@chrisrebert.com>
Wed, 28 Oct 2015 22:07:48 +0000 (15:07 -0700)
committerChris Rebert <code@chrisrebert.com>
Wed, 28 Oct 2015 22:09:57 +0000 (15:09 -0700)
Per http://caniuse.com/#feat=documenthead , document.head is supported in IE Mobile 10+,
so slightly simplify the JS accordingly.

[skip sauce]

docs/assets/js/ie10-viewport-bug-workaround.js
docs/getting-started/browsers-devices.md

index 479a6ebdae4682b89130688758d3cbdb61621d18..162dafb9ddea175891fcdbfdf283e5847e632f4a 100644 (file)
@@ -17,7 +17,7 @@
         '@-ms-viewport{width:auto!important}'
       )
     )
-    document.querySelector('head').appendChild(msViewportStyle)
+    document.head.appendChild(msViewportStyle)
   }
 
 })();
index ef66ac9a12da4675a7ca9a3aca14ce6142560db5..2cfaf7301bc1d590ed0fd13c3884ce13b7d0eb7b 100644 (file)
@@ -181,7 +181,7 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
       '@-ms-viewport{width:auto!important}'
     )
   )
-  document.querySelector('head').appendChild(msViewportStyle)
+  document.head.appendChild(msViewportStyle)
 }
 {% endhighlight %}