Quick technical question

170 views
Skip to first unread message

Georgiy Ivankin

unread,
Oct 21, 2013, 12:23:31 PM10/21/13
to fir...@googlegroups.com
Just a quick question to those knowing the internals: how does Firebug parses / edits stylesheets loaded from another domain? This is not allowed by the browser, so some workaround is probably used. I'd love to know how it's done: via some FF extensions API methods or elsewise?

Any tip is appreciated, be it a detailed explanation or a link to a method / module is source code. 
Thanks!

Simon Lindholm

unread,
Oct 21, 2013, 6:57:35 PM10/21/13
to fir...@googlegroups.com
For the CSS panel we simply use the standard method of `document.styleSheets` - since Firebug runs with higher ("chrome") JS privileges, this doesn't run up against same origin restrictions. (The "Source Edit" feature is more weird; there we use some internal API for capturing data from requests ("nsIChannel"s), so we are able to present the original source. It relates to Net panel code, which I don't know a lot about.)

Ivankin Georgiy

unread,
Oct 22, 2013, 2:15:33 AM10/22/13
to fir...@googlegroups.com
Thank you, Simon!


--
You received this message because you are subscribed to a topic in the Google Groups "Firebug" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebug/ySYUK-TmJcU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebug+u...@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/ff1f1463-8e1c-4582-8dbd-89e8dc4dd983%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages