O'Reilly logo

Rapid Application Development with Mozilla™ by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12.6. Debug Corner: Overlay Tips

Overlays are very simple and need little debugging, but there are one or two serious potholes to avoid.

The most subtle problem with overlays is caused by the contents.rdf file that sits inside the contents directory of a package. When the URL of an overlay is specified, it must be specified as plain XML text, not as a URI. This is wrong:

<li resource="chrome://package/content/overlay.xul"/>

This is right:

<li>chrome://package/content/overlay.xul</li>

If the package also acts as a master document (because it includes its own overlays), then it should be written as a resource when it is registered as a master. It should still be written as XML text when it is registered as an overlay. This stumbling block is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required