window.openDialog return value
Gijs Kruitbosch
gijskruitbosch at gmail.com
Fri Oct 26 15:54:00 UTC 2018
"It's complicated."
What are you actually trying to do? What does "use an internal chrome://
url top open a dialog" mean - are you passing a chrome: URL as the
thing/target to open, or are you calling openDialog from a
chrome/system-privileged context (and if so, what's the target URL, and
what other params are you passing)? Or both? From what "internal
chrome:// url" are you doing this (not all chrome: pages are equal)?
What does "Writing ... doesn't work" mean? Does it throw an exception?
Does reading the value on the other end throw an exception? Something else?
And what's the wider context here? Are you writing a patch for Firefox
itself, or something else?
At a guess, it sounds like you might be running into security wrappers
that prevent privileged code from touching unprivileged non-simple JS
things without jumping through hoops, because doing so is likely to be a
security risk (ie you could end up running arbitrary unprivileged code
in a privileged context and that would be Bad) which is why it's
normally prevented. But that's a guess, and without more details about
what you're doing it's hard to give a more definitive answer to your
question.
~ Gijs
On 26/10/2018 04:31, sfcheng at gmail.com wrote:
> I found that if I use an internal chrome:// url to open a dialog using
> window.openDialog, I can pass back return value using
> window.arguments[n].value="*****" just fine. However, if I use a file
> from the local file system, I wasn't able pass back return value.
> Writing to window.arguments[n].value doesn't work. I believe there is
> some security restriction here. Does anyway know which part of the C++
> code is responsible for defining the security rules for different url
> sources?
>
> Thank you.
>
> ------------------------------------------------------------------------
> Rest Regards,
> Shanfeng Cheng
> sfcheng at gmail.com
>
>
>
> _______________________________________________
> firefox-dev mailing list
> firefox-dev at mozilla.org
> https://mail.mozilla.org/listinfo/firefox-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20181026/a742b08e/attachment.html>
More information about the firefox-dev
mailing list