简体   繁体   中英

forEach on IE10 not working on Server 2008, but works on IE10 everywhere else

Is there any reason why the javascript function forEach would not work on IE10 when running on Windows Server 2008, when it works on all other installations of IE10 that I have available (including on BrowserStack )?

I'm in the middle of a remote-desktop upgrade on the test site for a client - and as it's a test site the client refuses to allow external http access. So the only web-access I have is using IE10 that is on the actual server itself (I am unable to upgrade the browser, as it's not my server).

I'm using the sortable.js library to implement simple sorting (unfortunately due to infrastructure issues, jquery is not available)... but IE10 on Windows Server 2008 throws the following error...

Error: Object doesn't support property or method 'forEach'

This error has added at least an hour to the upgrade (as I'm having to manually change sort orders in the database, rather than via the tools I have written)... and I'm only half way through.

The version on the server is identical to that on Browser Stack (10.0.9200.17566)... so I simply don't understand why it's not working.

Can anybody explain why this is happening - and more importantly if there is any way of fixing it (that doesn't involve changing the external javacsript library)?

Could IE10 be running in an older document mode (maybe in compatibility view)? The forEach function isn't defined in IE7 or IE8 mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM