Replace getElementsByTag by querySelector for IE10 Mobile plateform.

This commit is contained in:
Gregory HOULLIER 2014-01-05 20:15:48 +01:00
parent 84c33a822d
commit a53cf55be2
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@
'@-ms-viewport{width:auto!important}'
)
);
document.getElementsByTagName('head')[0].
document.querySelector('head').
appendChild(msViewportStyle);
}

View File

@ -852,7 +852,7 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
"@-ms-viewport{width:auto!important}"
)
)
document.getElementsByTagName("head")[0].appendChild(msViewportStyle)
document.querySelector("head").appendChild(msViewportStyle)
}
{% endhighlight %}
<p>For more information and usage guidelines, read <a href="http://timkadlec.com/2013/01/windows-phone-8-and-device-width/">Windows Phone 8 and Device-Width</a>.</p>