On Wed, Apr 15, 2015 at 8:01 PM, Boris Zbarsky <bzbar...@mit.edu> wrote:

> How does our XML prettyprinter manage this?  I seem to recall it
> force-loads an XBL binding that provides all the scriptability.

Yes, there is XBL [1] that implements expand/collapse and XSLT [2]
transforming the document. All wired together within nsXMLPrettyPrinter.cpp
file.



> Does that have the same problem with CSP headers?

This works since no script is directly injected into the page content (it's
separated in the binding).


> If not, can you take the same approach here?
>
We are obviously trying to avoid C++ code in devtools, but also XUL/XBL in
favor of pure JS/HTML/CSS stack.

Not sure if there is yet another way how to manipulate content with a script
that is living outside the content (frame script?).

Honza


[1]
http://mxr.mozilla.org/mozilla-central/source/dom/xml/resources/XMLPrettyPrint.xml
[2]
http://mxr.mozilla.org/mozilla-central/source/dom/xml/resources/XMLPrettyPrint.xsl
[3]
http://mxr.mozilla.org/mozilla-central/source/dom/xml/nsXMLPrettyPrinter.cpp#46
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to