Context menus are those menus that appear when a user right-clicks on a web page or browser element. These menus are contextual, which means that the menu will change in the options that it displays based on the context in which it is selected. For example, the context menu that displays when you right-click on a link will include options to allow you to interact with the link while the context menu for an image will include image specific options. To make things just a little more complicated, there may be multiple levels of context. The context menu for a link in a frameset is different than the context menu in a non-frameset web page.
In XUL, the structure of popup menus is hierarchical. The best analogy to HMTL code is tables where you have a main table defined with a <table> tag and individual rows and cells defined with the <tr> and <td> tags. XUL uses the <popup> tag to define a context menu. Individual menu items are defined with the <menuitem> tag. Just as you can nest tables within each other in HTML, you can also have nested context menus. These occur where you have a context menu item that has additional menu items associated with it. These nested menus can be tricky to work out. Pay careful attention to the order and location of your tags and save and test your changes frequently.
The entire set of context menus is bracketed with the <popupset> tags. The first set of <popup> tags are for the history menus that appear when you select the small arrows next to the forward and back buttons and for tooltips. We'll leave these turned on. We'll skip past the next set as it defines context menus for the SearchBar which we have disabled. Next, we have the AutoComplete popup. This appears when a user is filling out form elements on a web site. The AutoComplete popup allows a user to save data specific to a web site. On future visits to the site, the data is automatically filled into the form. This has the potential to be a big privacy problem in a kiosk situation so we'll want to comment it out.
Earlier, we used the Customize interface to add and remove toolbar items like the URL bar and the print button. It also allowed us to change the appearance of the toolbar buttons and add text below the buttons. If a user can access this interface, there is the potential for them not only to alter the appearance of the toolbar but to also bypass some of our security measures. By commenting out:
<popup id="toolbar-context-menu" onpopupshowing="updateToolbarStates(this); onViewToolbarsPopupShowing(event);">
we disable that popup and prevent users from accessing the interface.
Last updated: December 31, 2003
Created: December 1, 2002
If you are reading this, your browser probably doesn't support current HTML and CSS standards. While the site looks much better in a browser that supports web standards, you can still access all of the information that is here with any browser or Internet device.