midas, execCommand, cut, copy & paste

Fredrik de Vibe <[email protected]> 15 Apr 2003 21:28:16 +0200
Newsgroups gmane.comp.mozilla.devel.jseng,gmane.comp.mozilla.devel.xpcom
Organization UiO
Message-ID <[email protected]>
This boggles my mind. execCommand works fine in mozilla 1.4a, and in
the midas demo at http://www.mozilla.org/editor/midasdemo/ cut, copy
and paste works fine. When I try to use these functions myself,
however, they don't - they generete an
NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED exception with the message
"Access to XPConnect service denied" code: "1011".

In an attempt to isolate a bug, I downloaded the page at the above url
to test it at my localhost server, but to no avail, the exception is
still thrown - and only with these functions. The midas spec at
http://www.mozilla.org/editor/midas-spec.html says that 'paste' is
disabled due to security issues, but why does it work with the demo
when run from mozilla.org? I guess the same is the case with copy and
cut, just that the spec is incomplete, but the question remains.

I guess there is something I just don't understand about how these
functions work. I'm not sure about how XPCom works (yet) but the whole
js application surely runs entirely on the client?

Can anybody help me shed a light on this?

Btw: I also tried this at another (remote) web server, but no luck
there either.


-- 
--Fredrik
Truthful, adj.:
	Dumb and illiterate.
		-- Ambrose Bierce, "The Devil's Dictionary"