fix: add more robust check for `Element` prototype

fixes #13691
fixes #13414
fixes #13726
pull/13744/head
Simon Holthausen 2 years ago
parent 8a06d051e8
commit 4f3cacabfd

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: add more robust check for `Element` prototype

@ -320,7 +320,8 @@ function get_setters(element) {
var proto = get_prototype_of(element);
// Stop at Element, from there on there's only unnecessary setters we're not interested in
while (proto.constructor.name !== 'Element') {
// Do not use contructor.name here as that's unreliable in some browser environments
while (!Element.prototype.isPrototypeOf(proto)) {
descriptors = get_descriptors(proto);
for (var key in descriptors) {

Loading…
Cancel
Save