Loss of reactivity on DOM related objects #14013
Replies: 3 comments
-
|
Object.prototype.toString.call(new EventTarget); // [object EventTarget]core/packages/reactivity/src/reactive.ts Lines 43 to 56 in 45547e6 |
Beta Was this translation helpful? Give feedback.
-
|
Workaround: class DOMRelatedClass extends EventTarget {
[Symbol.toStringTag]() {
return "Object";
}
} |
Beta Was this translation helpful? Give feedback.
-
Hello @KazariEX , thanks for the workaround but it seems to break when calling EventTarget methods on DOMRelatedClass : You get errors such as : |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
3.6.0-alpha.2
Reproduction link
play.vuejs.org/
Steps to reproduce
Press each buttons on the example to increment the property of each class.
What is expected?
When pressing each button, the property of the related class should be updated and vuejs should render the new value since both class are reactive.
What is actually happening?
DOMRelatedClass do not trigger a rerender when its property is updated.
Bug is also present on DOMPoint, it is on that one that I first encountered the bug when I was creating a 2d rendering engine with canvas.
Beta Was this translation helpful? Give feedback.
All reactions