Changes between Version 1 and Version 2 of Ticket #18824, comment 1


Ignore:
Timestamp:
Mar 30, 2016, 12:55:36 PM (5 years ago)
Author:
paulrutter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18824, comment 1

    v1 v2  
    22
    33{{{
    4   dom.isDescendant = function(/*DOMNode|String*/node, /*DOMNode|String*/ancestor) {
     4  dom.isDescendant = has("dom-contains") ?
     5      // FF9+, IE9+, webkit, opera, iOS, Android, Edge, etc.
     6      function(/*DOMNode|String*/node, /*DOMNode|String*/ancestor) {
     7        return !!(( ancestor = dom.byId(ancestor)) && ancestor.contains && ancestor.contains(dom.byId(node)) );
     8      } : function(/*DOMNode|String*/node, /*DOMNode|String*/ancestor) {
    59        // summary:
    610        //    Returns true if node is a descendant of ancestor