cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Walsh (JIRA)" <>
Subject [jira] [Created] (CB-10021) window.requestFileSystem failing when inside of an iframe
Date Tue, 17 Nov 2015 01:57:11 GMT
Randy Walsh created CB-10021:

             Summary: window.requestFileSystem failing when inside of an iframe
                 Key: CB-10021
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android, Plugin File
    Affects Versions: 5.2.0
         Environment: Android 5.1.1  Sony Tablet

            Reporter: Randy Walsh

The following simple code allows you to invoke the window.requestFileSystem.  The original
index.html code runs fine and you can click the "requestFileSystem" button multiple times
just fine.

However, when attempting to run the same code inside of an IFRAME, it fails.  Gives an uncaught
error: Java Exception in cordova.js:967 and 938.

Once a failure occurs, even the original requestFileSystem then starts failing.

Any and all help would be much appreciated!  Thank you in advance,

Randy Walsh

<html xmlns="">
   <title>IFrame Bug</title>
   <script src="./js/jquery-2.1.1.min.js" type="text/javascript"></script>
   <script type="text/javascript" charset="utf-8" src="cordova.js"></script>

      function getFileSystem() {
         window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) {
            alert("requestFileSystem succeeded ")

         }, function (err) {
      function addIFrame() {
         $('<br />').appendTo('body');
         myIFrame = $('<iframe src="index.html" />').appendTo('body');

<body data-role="none">
   <button type="button" class="Button" id="id" name="id" onclick="getFileSystem()">requestFileSystem</button>
   <button type="button" class="Button" id="id" name="id" onclick="addIFrame()">Add
an IFrame</button>

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message