"use strict";
(function () {
let element = {
name: { writable: false },
dom: { writable: false , get: () => { return undefined; } },
get: () => { return this.dom; },
set: (dom) => { this.dom = dom; this.name = this.dom.nodeName.toLowerCase(); }
};
element = document.body;
alert(element.name);
}());
Alert выдает undefined