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