?
Solved

Testing/Debugging with Internet Explorer (Document Mode/Emulation)

Posted on 2016-09-12
4
Medium Priority
?
40 Views
Last Modified: 2016-10-30
When I use IE 11 (in document mode "Edge"), the javascript function "endsWith" is not defined, and breaks if I call it from within the webpage.

However, when I go sit down at my co-worker's desk and try it, it does have "endsWith" defined.  So I compared the browsers and they are both IE 11 (down to the same version #).

So,

1.  How is this possible?  Is there some way to ammend/update/upgrade/improve the browser's javascript?
2.  How am I going to debug multiple IE's given that two IE 11's are doing different things?



Thanks!
0
Comment
Question by:FLEA2007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Expert Comment

by:Dillyn Barber
ID: 41795286
If the javascript is in the html it most likely is a setting issue (or conflict from a browser addon). If it is an external JS file linked in try to append async="async" to it and/or clear browser cache.
0
 
LVL 22

Expert Comment

by:Kim Walker
ID: 41795362
Do they have the same operating system version? Technically, endsWith() isn't supported in IE 11?
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 41795419
endsWith is supported by MS Edge but none of MS IE (the last is 11) :
https://msdn.microsoft.com/en-us/library/mt146835(v=vs.94).aspx

Here the list of document modes :
https://msdn.microsoft.com/en-us/library/ff406036(v=vs.85).aspx

Double check you're in Edge mode if you launch IE11 (check the Emulation Tab) :
Check the User agent too :)

You can add the following code to extend the String object with endsWith :
String.prototype.endsWith = function(suffix) {
    return this.substr(-suffix.length) === suffix;
};

Open in new window


You can also force the browser to use Edge compatibilty mode :
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

Open in new window

0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This video teaches users how to migrate an existing Wordpress website to a new domain.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question