Li Hao (and others who have provided great info),

I have given a try to your suggestions but the behavior still exists:

- the "file:///" change
- tried applying a CSP to the page: <meta http-equiv="Content-Security-Policy" 
content="default-src 'none'; frame-src *">
- tried loading as an iframe

Being that you have created test cases that work, I must have an issue with my 
Manifest or the way I am setting up the XWalkView. This is a Cordova 
application where I am creating an XWalkView for the external web application 
using a plugin that tries to mimic InAppBrowser. So, it is being loaded within 
a Dialog object accordingly. I based it on the plugin committed here: 
https://github.com/Shoety/cordova-plugin-inappbrowserxwalk 

My Manifest.xml is as follows:

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" 
android:versionName="0.0.1" package="com.ionicframework.ionicblankapp" 
xmlns:android="http://schemas.android.com/apk/res/android";>
    <supports-screens android:anyDensity="true" android:largeScreens="true" 
android:normalScreens="true" android:resizeable="true" 
android:smallScreens="true" android:xlargeScreens="true" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <application android:hardwareAccelerated="true" 
android:icon="@drawable/icon" android:label="@string/app_name" 
android:supportsRtl="true">
        <activity 
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" 
android:label="@string/activity_name" android:launchMode="singleTop" 
android:name="MainActivity" 
android:theme="@android:style/Theme.Black.NoTitleBar" 
android:windowSoftInputMode="adjustResize">
            <intent-filter android:label="@string/launcher_name">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>

________________________________________
From: Li, Hao X [[email protected]]
Sent: Tuesday, May 17, 2016 9:24 PM
To: Zhang, Xiaofeng; Guido Pardi; [email protected]
Subject: RE: HTML page with Frameset in XWalkView

I try the code. The correct one should be "file:///", not "file://".

Change the Guido's code as follows, it will work:

    <frame id='course' src='file:///root/sdcard/web_application/start.htm' 
width='100%' height='100%'/>


Thanks,
Li Hao


-----Original Message-----
From: Crosswalk-help 
[mailto:[email protected]] On Behalf Of Zhang, 
Xiaofeng
Sent: Monday, May 16, 2016 1:01 PM
To: Guido Pardi <[email protected]>; 
[email protected]
Subject: Re: [Crosswalk-help] HTML page with Frameset in XWalkView

Hi Guido

Thanks for using Crosswalk.
I am sure XWalk support frameset and can load local html and local html in the 
frame. It works well in my test case.

In my test case, I did nothing special, just load a url like this:
private final static String TARGET_URL = 
"file:///storage/sdcard1/frameset.html";

My "frameset.html" as below:
<html>
<frameset >
    <frame src="iframe.html" />
</frameset>
</html>

My "iframe.html" as below, and a dolan.gif is also in the same location with 
the other two html.
<html>
<body>
    I'm an iframe
    <img src="dolan.gif">
</body>
</html>

Best Regards ☺
Xiaofeng Zhang

-----Original Message-----
From: Crosswalk-help 
[mailto:[email protected]] On Behalf Of Guido 
Pardi
Sent: Saturday, May 14, 2016 5:14 AM
To: [email protected]
Subject: [Crosswalk-help] HTML page with Frameset in XWalkView

Hi,

I have created a test HTML page that loads Javascript and displays a file as 
follows:

<html>
  <head>
    <meta name='viewport' content='width=device-width,minimum-scale=0.25, 
maximum-scale=5.0, user-scalable=1' />
    <script language = "JavaScript" src="scorm_1_2_api.js"></script>
    <script type="text/javascript">
        window.API = API;
        window.close = function() {
          API.triggerExit()
        };
    </script>
  </head>
  <frameset>
    <frame id='course' src='file://root/sdcard/web_application/start.htm' 
width='100%' height='100%'/>
  </frameset>
</html>

Within a normal Android Webview, I am able to load this HTML page and it 
successfully opens the locally stored web app within the frame. In XWalkView, I 
only see a blank white screen. Are frame sets not supported in XWalkView?

Any info would be much appreciated, and let me know if I can provide more 
details.
Thanks,
-Guido
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to