Closed Bug 725127 Opened 13 years ago Closed 12 years ago

allow loading xul pages from sdk

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 559306

People

(Reporter: irakli, Assigned: irakli)

References

Details

No description provided.
I talked with @mixedpuppy today and it looks like no way of loading xul pages from add-on was a show stopper for them multiple times. Also it looks like https://developer.mozilla.org/en/using_remote_xul should have addressed their main concern. I wonder if we should write a wrapper for this.
Assignee: nobody → rFobic
that certainly helps in the case where we need a non "navigator:browser" windowtype.
I'm ccing Henrik here, as he is trying to port XUL addons to the SDK. And he will need something to load existing XUL windows code from the SDK. I think that we can easily provide a small module that ease the registering of chrome.manifest files. I mean that, if somone wants to port an existing XUL addon, he will already have this chrome.manifest file ... And for people used to do XUL addons, it won't be that hard to write one.
Can someone please describe what would have to be done with the current code in the SDK to get this task accomplished?
OS: Mac OS X → All
Hardware: x86 → All
(In reply to Henrik Skupin (:whimboo) from comment #4) > Can someone please describe what would have to be done with the current code > in the SDK to get this task accomplished? The link in comment 1 points to a method that should work, but I haven't tried. Otherwise, we're doing the following to open a window with our own xul: var chatXul = ('<?xml version="1.0"?>' + //'<?xml-stylesheet ' + ' type="text/css"?> ' + '<window windowtype="mywindow" xmlns:html="'+ xhtmlNs+'" xmlns="' + xulNs + '">' + '<browser id="browser" src="'+options.url+'" disablehistory="indeed" type="content-primary" flex="1" height="100%"/>' + '</window>'); let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"] .getService(Ci.nsIWindowWatcher); var url = "data:application/vnd.mozilla.xul+xml," + escape(chatXul); var window = ww.openWindow(null, url, options.name, options.features, options.arguments); IMO having a way to use the manifest would be great.
Priority: -- → P2
He is a simple example which highlights what I meant in comment 3. https://github.com/ochameau/chrome-manifest-sdk-example In case some people want to have a chrome URI in jetpack ... here is a possible way to get one. It would be easier if we can register a chrome URI without chrome.manifest file. But I don't think there is any way to do it.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.