Is the iframe tag allowed within a trigger.io page (not a tabs page)?

北城余情 提交于 2019-12-11 05:53:47

问题


Is the iframe tag allowed within a trigger.io page (not a tabs page) ?

For example,

<iframe src="http://www.facebook.com/plugins/comments.php?href=example.com&permalink=1" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:130px; height:16px;" allowTransparency="true"></iframe> 

I've tried the statement above, but rather than displaying the content (for example, the real-time number of comments) inside the page, a new browser is opened.


回答1:


The answer depends on the particular device, to some extent.

On iOS, sourcing an external HTML page (i.e. one not part of the app itself) in an iframe counts as a separate page load which we defer to the underlying device. The same is not true on Android - we'll make this more consistent in the future, but by moving Android towards iOS's behaviour, rather than the other way.

In general, we were not expecting your users to interact with web pages in this way: if they are moving outside of your app to use an external site, we would recommend making this explicit with the use of forge.tabs.open or forge.tabs.openWithOptions (docs).

Note that there is explicit wording in Apple guidelines which prohibits the simple display of external websites as an app!



来源:https://stackoverflow.com/questions/10454486/is-the-iframe-tag-allowed-within-a-trigger-io-page-not-a-tabs-page

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!