Does anyone know what version of JavaScript is used by HTA files.  Currently creating some script files - and trying to make use of Object.defineProperty  When running as an HTA - it errors stating that Object doesn't support this property or m...
As you know we can define getters and setters in JS using defineProperty(). I've been stuck when trying to extend my class using defineProperty().  Here is an example code:  I have an array of fields which must be added to a object  fields = [...
I'm trying to use defineProperty to made attributes not appear in for...in cycle, but it doesn't work. Is this code correct?  function Item() {     this.enumerable = "enum";     this.nonEnum = "noEnum"; } Object.defineProperty...
I'm getting an error on Maximum call stack size for this code.  function ValueObject() { }  ValueObject.prototype.authentication;  Object.defineProperty(ValueObject.prototype, "authentication", {     get : function () {         return thi...
The following doesn't work, from my getter, I can't see _nickname defined in the 'class' Person.  var Person = function (args) {      var _nickname = '';     if (args === undefined || args === null) {         return;     }...
Let's take the following code:  var obj = {}; var x = Symbol(); Object.defineProperties(obj, {   [x]: {     value: true,     writable: true   },   "property2": {     value: "Hello",     writable: false   }   // etc. etc. }); conso...
Consider the following code:  var x = 0;  var o = {};  function getter() {     return x; }  Object.defineProperty(o, "y", {     get: getter,     set: function (y) {         x = y;          Object.defineProperty(o, "y", {             g...
Considering the basic scenario of usage, do  foo.bar = 'baz';   and  Object.defineProperty(foo, 'bar', {   value: 'baz',   configurable: true,   enumerable: true,   writable: true });   behave exactly the same in supported bro...
Like you all know a button is a button... click, up, down, do this, do that. So I wrote some default button behavior "class/object".  external default button.js:  function Button(parent) {     var self = this;     this.enabled = true;     thi...
Asking about Object.defineProperty as demonstrated below:  function testComponent(){     var testProperty;     Object.defineProperty(this, "testProperty",     {         get : function()         {            return testProperty;         },...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.