
Check if nodes are Elements and if so cast to Element to avoid build warnings.
Nodes do not support these properties.
A better solution for getFirstElementChild and getLastElementChild would be to
switch to @param {Element} element, but that would probably introduce a lot of
build warnings in code that already uses this function.

R=arv
DELTA=12  (4 added, 0 deleted, 8 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=583


git-svn-id: 35241bd708fe29f1f6c7a4322d322e99ff93b95e@716 0b95b8e8-c90f-11de-9d4f-f947ee5921c8

johan/closure-library,johan/closure-library,johan/closure-library