问题
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