Window. External is often used in my work. I was confused and asked again today, so I learned it and noted down my memo.
--------------------------------------
In JS, we can use window. External. AAAA () to call the external method AAAA provided by the browser.
Internet Explorer has implemented some external methods by default. For more information, see
1: A Chinese CharacterArticle: Http://www.it118.org/Specials/2e876829-483a-4216-a6ef-08a472c94297/8f8d0507-b4c8-4d92-8e35-3c88dade3a17.htm
2: More: http://msdn.microsoft.com/library/default.asp in the official documentation? Url =/Workshop/author/DHTML/reference/objects/external. asp
In the project embedded with a browser, in addition to the external methods provided by IE by default, the web script is required to call C ++CodeTo achieve this interaction, you must implement script extension. Script extension is implemented inProgramImplements an idispatch interface, and returns this interface pointer through the ongetexternal virtual function of the chtmlview class, so that the window can be used in the script. external. XXX (the keyword window can be omitted) to reference the method or attribute exposed by the interface (XXX is the method or attribute name ).
See "implement script extension" http://topic.csdn.net/u/20080116/17/5fbac468-1188-4c9c-9339-ad48edd8a4d3.html
Firefox and chrome also provide external objects. For example, both of them implement opensearch's two external methods by default:
addsearchprovider issearchproviderinstalled
in chrome, you can enter window. external.
Firefox provides a little more external methods by default, which can also be seen through firebug.