[Project_owners] Firefox/SeaMonkey API parity

Neil neil at parkwaycc.co.uk
Sun Nov 11 03:23:02 PST 2007


Michael Vincent van Rantwijk, MultiZilla wrote:

> Neil wrote:
>
>> contentPrincipal - property on tabbrowser, shorthand for 
>> contentDocument.nodePrincipal
>
> Isn't contentPrincipal already a property in browser.xml?

Exactly (well, in Fx3), and many of the browser properties are shadowed 
on tabbrowser.

> Using gBrowser.mCurrentBrowser.contentPrincipal in JS is so much 
> clearer to understand, at least to me.  Oh, and why duplicate things?

Because in theory, unless you're using tab-related methods, you 
shouldn't have to care whether you're using a browser or tabbrowser. 
That for instance is why progress notifications are only propagated for 
the current browser.

> BTW Who made the call to drop the leading m i.e. it should at least be
> mContentPrincipal

No, it's a property, not a private field (note that there's disagreement 
over whether private fields get m or _ prefixes).


More information about the Project_owners mailing list