My app uses WKWebView to present html string. WkWebView is embedded in a scrollView because i have several other elements (e.g. buttons, tableViews). Because of that i need to calculate the size of WkWebvView content and for that i use evaluateJavaScript(“document.body.scrollHeight”, completionHandler: method.
Whenever i have embedded tweet in a html string, content height is wrongly calculated and my webview cuts a piece of its height.
Part of html string which has tweet embedded looks like this:
“<blockquote class=“twitter-tweet” data-lang=“en”>
<a href=“https://twitter.com/hashtag/SYRIA?src=hash”>#SYRIA Admiral Essen frigate launched <a href=“https://twitter.com/hashtag/Kalibr?src=hash”>#Kalibr cruise missiles against ISIS objects near Deir ez-Zor <a href=“https://t.co/azHAIii07g”>pic.twitter.com/azHAIii07g
— Минобороны России (@mod_russia) <a href=“https://twitter.com/mod_russia/status/905007557554700288”>September 5, 2017
<script src=“https://platform.twitter.com/widgets.js”>”
Is there something missing in this code, or should i set something in webview methods?
Any advice is appreciated??