Question

When i want to use window.external on internet explorer 9, it's always null. I want to use pinned methods but it cannot find the methods because of window external is null. if wonder that what is "pinned" you can check this link. http://msdn.microsoft.com/en-us/library/gg131029(v=vs.85).aspx Can any body help me for this ?

Was it helpful?

Solution

In my IE9 typeof window.external returns "object" but I also don't have Pinned methods. Check your IE version for compatibility with pinned api first here (it will tell you if you need an upgrade) http://ie.microsoft.com/testdrive/Browser/SitePinning/Default.html?o=1

Regarding window.external it usually refers to additional level of Api when you use IE as a WebBrowser control in your app (hosting scenarious):

Window.external allows access to an additional object model provided by host applications of the Windows Internet Explorer browser components.

http://msdn.microsoft.com/en-us/library/ms535246%28v=vs.85%29.aspx

OTHER TIPS

I ran in to this problem. Apparently the methods on window.external exist but are "hidden" from JavaScript's methods of investigating an object. window.external.somefuntion will always appear to be undefined yet if you call the method (window.external.somefunction()) then the code will work.

Sadly this means the only way to safely call methods on window.external is to call the methods from with in a try-catch.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top