The last major set of changes that we'll make in browser.xul will be to secure the toolbar menus and buttons. In XUL, toolbars are defined with the <toolbox> and <toolbar>, <toolbarpalette> and <toolbarset> tags. Within each toolbar, specific elements of the toolbar are defined with the either the <menubar> or <toolbaritem> tags. As we saw with the context menus, these elements are hierarchical and in some cases contextual. We'll focus first on the menubar and its associated menus.
The menubar is the topmost toolbar in Phoenix. The menu entries activate the various dropdown menus that allow access to browser features and functionality. Unlike any of the other toolbars, the menubar is the only toolbar that can not be disabled through the interface. The only way to alter it or remove it is by editing browser.xul. In some kiosk situation, we may just want to disable the menubar completely. To do that, you'll need to start and end your comments around the opening and closing tags for <toolbar type="menubar" ..>. In this tutorial, we allow access to the menubar with access to only those items that we want.
As we work our way through the menubar items, we'll use two approaches to securing the menubar. In some cases, we'll selectively edit the specific menus. The dropdown menus under each menu item, like File and View follow the same structure as the context menus. We can comment out any entries that we do not want users to access. In other cases, like the Bookmarks menu, we'll simply comment out the entire menu, removing it from the menubar. When we are done, our menubar will only include those entries we want users to see.
Last updated: December 31, 2002
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.