Previewing XUL documents with a dtd doesn't take updated dtd into account (flush chrome caches?)

RESOLVED FIXED

Status

Other Applications
XUL Explorer
--
major
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: Gijs, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
STR:

1. Make a new window XUL doc, title being &window.title;
2. Use an empty foo.dtd as the dtd for this xul doc.
3. Preview the file. You will get a complaint that the entity is not defined or something of the sort.
4. Add the entity window.title to foo.dtd
5. Preview again.


Expected results:
You see an empty XUL window

Actual results:
You see the same error you got in step 3. If you restart XUL Explorer, load the same xul file again, and preview it, it will work.

Note that in order to use a dtd in this way, you will need to map the dtd to chrome using the Options panel and a manifest file.

I believe that flushing the chrome caches should solve this issue. Basically, this:

var os = getService("@mozilla.org/observer-service;1", "nsIObserverService");
os.notifyObservers(null, "chrome-flush-caches", null);

should do. May have side-effects that we don't want, though. (and yes, I did try just disabling the xul cache. That didn't help, as far as I've been able to tell).
Added code to explorer.refreshPreview method. That seemed to fix it
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.