When you do this:
Object.defineProperty(el, 'data-simple-scrollbar', new SimpleScrollbar(el));
You will get
{value: undefined, writable: false, enumerable: false, configurable: false}
When calling
Object.getOwnPropertyDescriptor(el, 'data-simple-scrollbar')
Also el['data-simple-scrollbar'] will be undefined
Object.defineProperty() expects a PropertyDescriptor that must be an object with 'value' property;
So the correct version is:
Object.defineProperty(el, 'data-simple-scrollbar', {value: new SimpleScrollbar(el)});
Please fix this. I'm not able to do a pull request right now
When you do this:
Object.defineProperty(el, 'data-simple-scrollbar', new SimpleScrollbar(el));
You will get{value: undefined, writable: false, enumerable: false, configurable: false}
When callingObject.getOwnPropertyDescriptor(el, 'data-simple-scrollbar')
Alsoel['data-simple-scrollbar']
will beundefined
Object.defineProperty()
expects a PropertyDescriptor that must be an object with 'value' property;So the correct version is:
Object.defineProperty(el, 'data-simple-scrollbar', {value: new SimpleScrollbar(el)});
Please fix this. I'm not able to do a pull request right now