+var WLXMLDocumentNodeMethods = {
+ isInside: function(query) {
+ var parent = this.getParent(query);
+ return !!parent;
+ },
+ getParent: function(query) {
+ /* globals Node */
+ var me = this.nodeType === Node.ELEMENT_NODE ? [this] : [],
+ toret;
+ me.concat(this.parents()).some(function(node) {
+ if(node.is(query)) {
+ toret = node;
+ return true;
+ }
+ });
+ return toret;
+ },
+};
+