From 6f32fc022cd25dac72fd693d384b7aed4a754e06 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Tue, 20 Aug 2019 13:00:47 -0600 Subject: [PATCH] Copy attributes from hijacked Flash objects --- web/demo/www/element.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/demo/www/element.js b/web/demo/www/element.js index c901b0e8c..7008d69da 100644 --- a/web/demo/www/element.js +++ b/web/demo/www/element.js @@ -10,6 +10,12 @@ class RuffleObjectShadow { this.params = RuffleObjectShadow.params_of(elem); this.oldelem = elem; this.elem = document.createElement("div"); + for (let attrib of this.oldelem.attributes) { + if (attrib.specified) { + this.elem.setAttribute(attrib.name, attrib.value); + } + } + this.shadow = this.elem.attachShadow({mode: 'closed'}); this.shadow.appendChild(ruffle_tmpl.content.cloneNode(true));