diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/assets/embed.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/assets/embed.js b/src/main/assets/embed.js index d4cbab8eb..3b8946bfe 100644 --- a/src/main/assets/embed.js +++ b/src/main/assets/embed.js @@ -72,8 +72,8 @@ function makeIframe(src, w, h, scrolling='no') { } function makeResizableToRatio(element, ratio) { - element.dataset['ratio'] = ratio; - makeResizable(element, w => w * element.dataset['ratio']); + element.setAttribute('data-ratio', ratio); + makeResizable(element, w => w * element.getAttribute('data-ratio')); } // calcHeight :: Number -> Number -- calculate element height for a given width |