ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Roll Your Own Browser
Subject:   Instructions to get this example up and running
Date:   2003-01-22 07:27:34
From:   brianking
Here are quick and dirty instructions to get the customised browser example from this article up and running:

1. Create the following directory structure below the chrome directory on your Mozilla installation:

2. Create the following file, name it 'contents.rdf', and put it in the new content directory:

<?xml version="1.0"?>

<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

<!-- list all the packages being supplied -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:mybrowser"/>

<!-- package information -->
<RDF:Description about="urn:mozilla:package:mybrowser"


3. Add the XUL and JS file to the content folder too.
Please rename the files to mybrowser.xul/.js, as I don't want any clashes if you choose to install it on a Phoenix distribution.
When you do this, you will have to modify in the XUL file the path to the JS file from:
<script type="application/x-javascript" src="chrome://jslib/content/browser.js"/>
<script type="application/x-javascript" src="chrome://mybrowser/content/mybrowser.js"/>

4. Close Mozilla. In the chrome folder, add the following line to 'installed-chrome.txt'.

5. Launch the example from the command line:
mozilla -chrome chrome://mybrowser/content

That should do it!