You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using webaudiocontrols in WebAudio plugins that are WebComponents. I wrote a host in which these plugins can be dragged and dropped into the DOM. Each time a connectedCallback is called, and webaudiocontrols breaks because of the multiple Object.defineProperties that scream because the properties have already be defined.
An easy fix is to add a test before defining the properties
I can make a PR but I'm afraid to be a bit late compared to your last updates... I will try to catch up and make a proper PR. But if you could add a test to check if a property is defined before defining it with ObjectProperty, this will enable WebComponents using webaudiocontrols to be dragged and dropped in the DOM without breaking.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
I'm using webaudiocontrols in WebAudio plugins that are WebComponents. I wrote a host in which these plugins can be dragged and dropped into the DOM. Each time a connectedCallback is called, and webaudiocontrols breaks because of the multiple Object.defineProperties that scream because the properties have already be defined.
An easy fix is to add a test before defining the properties
if (!this.hasOwnProperty("src")) Object.defineProperty(this, "src", { get: () => { return this._src }, set: (v) => { this._src = v; this.setupImage() } });
I made this fix in a local version of webaudiocontrols : https://github.com/53js/webaudiomodule/blob/fix/dragndrop/packages/pingpongdelay/src/Gui/utils/webaudio-controls.js check all lines with an occurence of "Object.defineProperty" !
I can make a PR but I'm afraid to be a bit late compared to your last updates... I will try to catch up and make a proper PR. But if you could add a test to check if a property is defined before defining it with ObjectProperty, this will enable WebComponents using webaudiocontrols to be dragged and dropped in the DOM without breaking.
Thanks in advance.
The text was updated successfully, but these errors were encountered: