|
|
|
|
21
|
return;
|
21
|
return;
|
22
|
}
|
22
|
}
|
23
|
clearInterval(updateSizeInterval)
|
23
|
clearInterval(updateSizeInterval)
|
24
|
- height = ${element}.offsetHeight || window.innerHeight;
|
|
|
25
|
- width = ${element}.offsetWidth || window.innerWidth;
|
|
|
|
|
24
|
+ height = ${element}.offsetHeight || document.documentElement.offsetHeight;
|
|
|
25
|
+ width = ${element}.offsetWidth || document.documentElement.offsetWidth;
|
26
|
window.ReactNativeWebView.postMessage(JSON.stringify({ width: width, height: height }));
|
26
|
window.ReactNativeWebView.postMessage(JSON.stringify({ width: width, height: height }));
|
27
|
}
|
27
|
}
|
28
|
`;
|
28
|
`;
|
|
|
|
|
52
|
window.addEventListener('load', updateSize);
|
52
|
window.addEventListener('load', updateSize);
|
53
|
window.addEventListener('resize', updateSize);
|
53
|
window.addEventListener('resize', updateSize);
|
54
|
${domMutationObserveScript}
|
54
|
${domMutationObserveScript}
|
55
|
- ${Platform.OS === 'ios' ? makeScalePageToFit(zoomable) : ''}
|
|
|
|
|
55
|
+ ${makeScalePageToFit(zoomable)}
|
56
|
updateSize();
|
56
|
updateSize();
|
57
|
`;
|
57
|
`;
|
58
|
|
58
|
|