Why does goog.dom.getAncestorByClass delcare its return type as Node instead of Element?

64 views
Skip to first unread message

Michael Bolin

unread,
Feb 13, 2012, 6:26:07 PM2/13/12
to closure-lib...@googlegroups.com
Is this just an oversight? Or some obscure edge case?

If the former, let's fix it!

If the latter, let's fix it! Recall that goog.dom.classes methods declare Node as the param type instead of Element for convenience, so this should probably be treated the same way, even if there is an obscure edge case.

--Michael

Shawn Brenneman

unread,
Feb 16, 2012, 10:16:51 PM2/16/12
to closure-lib...@googlegroups.com
I agree. Sadly, trying to change from Node to Element has revealed some type misuse in dependent code. It'll take a little bit of internal cleanup for the change to go through.

Shawn
Reply all
Reply to author
Forward
0 new messages