ChromeWorker and "@mozilla.org/xmlextras/domparser;1"

RESOLVED INVALID

Status

()

--
enhancement
RESOLVED INVALID
8 years ago
5 years ago

People

(Reporter: erikvvold, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
Can "@mozilla.org/xmlextras/domparser;1" be made available to ChromeWorkers?
You can't access DOM nodes from off the main thread.  So the usability of domparser would be pretty darned minimal, no?
(Reporter)

Comment 2

8 years ago
So the following is not possible in ChromeWorker:

var doc = Cc["@mozilla.org/xmlextras/domparser;1"].createInstance(Ci.nsIDOMParser).parseFromString("<UserScriptConfig/>", "text/xml");
var ele = doc.createElement("Script");
doc.firstChild.appendChild(ele);

because line 2 & 3 cannot be done off of the main thread?
The parseFromString in line 1 will almost certainly corrupt memory if done from a background thread.

(Note that |doc| above is a DOM node, by the way.)
(Reporter)

Comment 4

8 years ago
ah alright, I'll prob use JSON for storage now them, thanks for the info!
(Reporter)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.