Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
var svg = $('svg')[0];
parseNode(svg, this);
this.flipY = true;
},
};
// hack for jsb, not use __proto__
var DomHandler = require('domhandler');
var NodePrototype = require("domhandler/lib/node");
var ElementPrototype = require("domhandler/lib/element");
DomHandler.prototype._addDomElement = function(element){
var parent = this._tagStack[this._tagStack.length - 1];
var siblings = parent ? parent.children : this.dom;
var previousSibling = siblings[siblings.length - 1];
element.next = null;
if(this._options.withStartIndices){
element.startIndex = this._parser.startIndex;
}
if (this._options.withDomLvl1) {
var originElement = element;
element = Object.create(element.type === "tag" ? ElementPrototype : NodePrototype);
for (var k in originElement) {
element[k] = originElement[k];
var DomHandler = require("domhandler"),
DomUtils = require("domutils"),
CSSselect = require("CSSselect");
function Handler(options){
if(!(this instanceof Handler)) return new Handler(options);
var that = this;
DomHandler.call(this, function(e, dom){
that.emit("dom", dom);
}, options, function(elem){
that.emit("element", elem);
});
}
require("util").inherits(Handler, require("events").EventEmitter);
Object.getOwnPropertyNames(DomHandler.prototype).forEach(function(name){
Handler.prototype[name] = DomHandler.prototype[name];
});
Handler.prototype.select = function(selector, cb){
if(typeof selector === "string"){
selector = CSSselect.parse(selector);
}
function onElem(elem){
if(selector(elem)) cb(elem);
}
this.on("element", onElem);
return onElem;
};
Handler.prototype.remove = function(selector){
return this.select(selector, DomUtils.removeElement);
tmp;
item = item.children;
addConditionally(entry, "id", "guid", item);
addConditionally(entry, "title", "title", item);
addConditionally(entry, "link", "link", item);
addConditionally(entry, "description", "description", item);
if ((tmp = fetch("pubDate", item)))
entry.pubDate = new Date(tmp);
return entry;
});
}
}
this.dom = feed;
DomHandler.prototype._handleCallback.call(
this,
feedRoot ? null : Error("couldn't find root of feed")
);
};
tmp;
item = item.children;
addConditionally(entry, "id", "guid", item);
addConditionally(entry, "title", "title", item);
addConditionally(entry, "link", "link", item);
addConditionally(entry, "description", "description", item);
if ((tmp = fetch("pubDate", item)))
entry.pubDate = new Date(tmp);
return entry;
});
}
}
this.dom = feed;
DomHandler.prototype._handleCallback.call(
this,
feedRoot ? null : Error("couldn't find root of feed")
);
};
Object.getOwnPropertyNames(DomHandler.prototype).forEach(function(name){
Handler.prototype[name] = DomHandler.prototype[name];
});