javascript - Apache Cordova Visual Studio 2015 iframe -
iframe not work @ all. iframe loads html, head , body tags here:
<html> <head></head> <body></body> </html> //iframe called in index.html <iframe src="http://whatever.com" style="height:100%; width:100%;"></iframe>
inappbrowser , other stuff working.
how correctly?
why iframe not work?
i did it! solution iframe.
html head:
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /> <meta http-equiv="content-type" content="text/html; charset=utf-8">
iframe:
<iframe src="http://somewebsite.com" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" id="activityframe" style="width:100%; height:100%;" frameborder="0"></iframe>
config.xml:
<access origin="*" /> <access origin="http://somewebsite.com" /> //or can add visual studio dialog <preference name="websecurity" value="disable" />
and should work well.
i hope else. :)
Comments
Post a Comment