Dom.isOrHasChild() fails for SVG elements in IE9 (standards mode)

44 views
Skip to first unread message

jandm

unread,
Mar 4, 2013, 7:54:03 AM3/4/13
to google-we...@googlegroups.com
Hi,

i am using a library (gwt-graphics) that implements SVG elements by extending the Widget class. Widget internally calls Dom.isOrHasChild() for its event handling, but this causes a failure on IE9 as the method contains() is not implemented for SVG elements. A possible solution would be to use the compareDocumentPosition() function in DOMImplIE9, similar to DOMImplMozilla:

  @Override
  public native boolean isOrHasChild(Node parent, Node child) /*-{
    // For more information about compareDocumentPosition, see:
    // http://www.quirksmode.org/blog/archives/2006/01/contains_for_mo.html
    return (parent === child) || !!(parent.compareDocumentPosition(child) & 16);
  }-*/;


Has anyone encountered this before or submitted an issue for this problem ?

Kind Regards,
Jan

jandm

unread,
Mar 6, 2013, 5:36:48 AM3/6/13
to google-we...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages