Given that this on a hot path, could that be optimised to 
return name === "div" && /**@type{!HTMLDivElement}*/(e).className === "annotationWrapper";
instead?
So it would avoid the evaluation of "e && /**@type{!HTMLDivElement}*/(e).className" for 99,9 % (based on adhoc heuristic research) of the calls.