I am using wkwebview to load given HTML strings using loadHTMLString method. After wkwebview didFinishNavigation I am updating height of wkwebview to content height by evaluating javascript "document.height". This is working for plain html string.
but for html string with embeded tweet height calculation goes wrong. here is tweet content
</p>
<blockquote class="twitter-tweet">
<p lang="fr" dir="ltr">Union Cabinet approves civil aviation policy.</p>— Press Trust of India (@PTI_News)
<a href="https://twitter.com/PTI_News/status/742990663495647232">June 15, 2016</a></blockquote>
<p>
<script>window.twttr = (function(d, s, id)
{var js, fjs = d.getElementsByTagName(s)[0],t = window.twttr || {};if (d.getElementById(id)) return t;js = d.createElement(s);js.id = id;
js.src = "https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js, fjs);t._e = [];
t.ready = function(f)
{t._e.push(f);};return t;}(document, "script", "twitter-wjs"));</script>
So after webview loads twitter feeds completely, we do not get callback in wkwebviewdelegate methods .