Boris Zbarsky
2010-04-23 03:01:00 UTC
So I'm looking at creating a non-virtual IsElement().
While examining the callsites, it seems like a lot of the use is in
assertions in places where we want to be sure we're dealing with an
Element node. Would it make sense to create an nsIElement for now,
sitting between nsIContent and nsGenericElement, to just enforce this
sort of invariant in function signatures? Or should we just make such
functions take nsGenericElement arguments? Or maybe that plus rename
nsGenericElement to mozilla::dom::Element or something?
-Boris
While examining the callsites, it seems like a lot of the use is in
assertions in places where we want to be sure we're dealing with an
Element node. Would it make sense to create an nsIElement for now,
sitting between nsIContent and nsGenericElement, to just enforce this
sort of invariant in function signatures? Or should we just make such
functions take nsGenericElement arguments? Or maybe that plus rename
nsGenericElement to mozilla::dom::Element or something?
-Boris