WKWebView中的iframe问题

时间:2018-12-19 16:55:12

标签: ios wkwebview

我有WKWebView,可在其中使用loadHTMLString方法加载html内容。在我的html代码中,我有两个iframe:

<iframe align=\"middle\"
 allowtransparency=\"\"
 frameborder=\"0\"
 height=\"820px\"
 id=\"\"
 scrolling=\"no\"
 seamless=\"\"
 src=\"//my.site.ru/files_static/edd/2016/speech_countries/6/first.html\" 
 width=\"100%\">
</iframe>
<iframe align=\"middle\"
 allowtransparency=\"\"
 frameborder=\"0\"
 height=\"820px\"
 id=\"\"
 scrolling=\"no\"
 seamless=\"\"
 src=\"http://my.sample.ru/files_static/edd/2016/speech_countries/6/first.html\" 
 width=\"100%\">
</iframe>

然后,我将其称为loadHTMLString(myHtmlString,baseURL:URL(string:“ https://example.ru”)),并遇到以下情况: 1)第一个iframe成功加载 2)第二个iframe为空

如果我使用http://example.ru作为基本网址,则两个iframe都会成功加载。但是我仍然不明白为什么我不能在基本URL中使用https协议

0 个答案:

没有答案
相关问题