From: Chris Rebert Date: Wed, 28 Oct 2015 22:07:48 +0000 (-0700) Subject: IE10 Mobile viewport bug workaround: document.querySelector('head') => document.head X-Git-Tag: v4.0.0-alpha.2~202^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee34e924ddef0696f41445b4631b811edbececac;p=thirdparty%2Fbootstrap.git IE10 Mobile viewport bug workaround: document.querySelector('head') => document.head Per http://caniuse.com/#feat=documenthead , document.head is supported in IE Mobile 10+, so slightly simplify the JS accordingly. [skip sauce] --- diff --git a/docs/assets/js/ie10-viewport-bug-workaround.js b/docs/assets/js/ie10-viewport-bug-workaround.js index 479a6ebdae..162dafb9dd 100644 --- a/docs/assets/js/ie10-viewport-bug-workaround.js +++ b/docs/assets/js/ie10-viewport-bug-workaround.js @@ -17,7 +17,7 @@ '@-ms-viewport{width:auto!important}' ) ) - document.querySelector('head').appendChild(msViewportStyle) + document.head.appendChild(msViewportStyle) } })(); diff --git a/docs/getting-started/browsers-devices.md b/docs/getting-started/browsers-devices.md index ef66ac9a12..2cfaf7301b 100644 --- a/docs/getting-started/browsers-devices.md +++ b/docs/getting-started/browsers-devices.md @@ -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 %}