خرید بک لینک

Vote count: 0

We have javascript widget which dynamically loads an iFrame to display exteal content. When iframe have loaded or it's content have resized it send message via postMessage. Widget get a message and resize iframe:

iframe.style.height = msg.value + 'px';

It works correctly on most browsers except chrome 50 on Android 5.0. Besides this code don't work on Windows Mobile Emulator on browserstack. I tried to change property and attribute:

iframe.setAttribute("height", msg.value + 'px');
iframe.height = msg.value;
iframe.style.height = msg.value + 'px';

But it doesn't work.

After height has changed I checked it:

setTimeout(function() {
    alert(iframe.style.height)
},
10000);

Alert shown that iframe's height has changed but iframe hasn't resized on page.

I don't understand how resolve it. Has anyone run into the same problem?

asked 30 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 11 تير 1395 ساعت: 17:47

صفحه بندی