aboutsummaryrefslogtreecommitdiff
path: root/src/main/assets/embed.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-02-02 21:54:10 +0300
committerGravatar Vitaly Takmazov2019-02-02 21:54:10 +0300
commitf8b0fa899ef35fdc4b8056976a37f792af3d2a83 (patch)
treee0142d66da2505e7a6521be2f4cdac2aaa416892 /src/main/assets/embed.js
parent7df88497f994eb4e470b39f146bfc1a35d1228e3 (diff)
Element.dataset is not supported on old browsers
Diffstat (limited to 'src/main/assets/embed.js')
-rw-r--r--src/main/assets/embed.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/assets/embed.js b/src/main/assets/embed.js
index d4cbab8e..3b8946bf 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