browser-x
Version:
A partial implementation of the W3C DOM API on top of an HTML5 parser and serializer.
29 lines (24 loc) • 569 B
JavaScript
var Node = require('./node');
function Attr(ownerDocument, name, specified, value) {
Node.call(this, ownerDocument, name, value, Node.ATTRIBUTE_NODE);
Object.defineProperties(this, {
specified: {
value: specified
}
});
}
Attr.prototype = Object.create(Node.prototype, {
name: {
get: function() {
return this.nodeName;
}
},
value: {
get: function() {
return this.nodeValue;
}
}
});
Attr.prototype.constructor = Attr;
module.exports = Attr;
;