From f8b0fa899ef35fdc4b8056976a37f792af3d2a83 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 2 Feb 2019 21:54:10 +0300 Subject: Element.dataset is not supported on old browsers --- src/main/assets/embed.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/assets') 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 -- cgit v1.2.3