|
||
| Inside Technique : Extending the Browser : Your First Extension All extensions are made avaiable on the browser's context menu. The context menu is displayed whenever the user right clicks on a document. We will demonstrate a quick extension that displays your document's URL. In the example, we manually register the component so you can see exactly how the extensions work.
You now have created your first extension. To remove the extension, run RegEdit and delete the key representing the menu choice (you do not have to delete the MenuExt key). When you pasted the URL script, you may have noticed the use of the external object. The external object is used in Dynamic HTML to reference properties that are from another context. In this case, the menuArugments property is used to access the window instance of the browser that called the extension. If you are familiar with scriptlets, the external object should not be new to you as its used to raise events in the containing application. Since the menuArguments property represents a window object, you can use it to navigate from the window to the displayed document. Next, we take you through building a more complete and useful annotate extension. Page 1:Extending the Browser © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |