.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / domhandler / lib / element.js
1 // DOM-Level-1-compliant structure
2 var NodePrototype = require('./node');
3 var ElementPrototype = module.exports = Object.create(NodePrototype);
4
5 var domLvl1 = {
6         tagName: "name"
7 };
8
9 Object.keys(domLvl1).forEach(function(key) {
10         var shorthand = domLvl1[key];
11         Object.defineProperty(ElementPrototype, key, {
12                 get: function() {
13                         return this[shorthand] || null;
14                 },
15                 set: function(val) {
16                         this[shorthand] = val;
17                         return val;
18                 }
19         });
20 });