About Window. External

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.