MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Element

Function Element

static/word2md/mammoth.browser.js:3114–3130  ·  view source on GitHub ↗
(tagName, attributes, options)

Source from the content-addressed store, hash-verified

3112}
3113
3114function Element(tagName, attributes, options) {
3115 var tagNames = {};
3116 if (_.isArray(tagName)) {
3117 tagName.forEach(function(tagName) {
3118 tagNames[tagName] = true;
3119 });
3120 tagName = tagName[0];
3121 } else {
3122 tagNames[tagName] = true;
3123 }
3124
3125 this.tagName = tagName;
3126 this.tagNames = tagNames;
3127 this.attributes = attributes || {};
3128 this.fresh = options.fresh;
3129 this.separator = options.separator;
3130}
3131
3132Element.prototype.matchesElement = function(element) {
3133 return this.tagNames[element.tagName] && _.isEqual(this.attributes || {}, element.attributes || {});

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected