Re: midas, execCommand, cut, copy & paste

Georg Maaß <[email protected]> Wed, 16 Apr 2003 07:34:47 +0200
Newsgroups gmane.comp.mozilla.devel.jseng,gmane.comp.mozilla.devel.xpcom
Message-ID <[email protected]>
Fredrik de Vibe wrote:

> 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?

I can't help you, but I get the same problem in my Applycation, which is 
based on the midas demo but modified to work with both Mozilla and IE:

Error: uncaught exception: [Exception... "Access to XPConnect service 
denied"  code: "1011" nsresult: "0x805303f3 
(NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED)"  location: 
"http://cms.itanix.vnett.de/admin/js/MarkupEditor/editor_GECKO.js Line: 82"]