cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikhil Khandelwal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-10492) File System API missing in web workers
Date Mon, 01 Feb 2016 18:21:40 GMT

     [ https://issues.apache.org/jira/browse/CB-10492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nikhil Khandelwal updated CB-10492:
-----------------------------------
    Labels: file filesystem javascript triaged worker  (was: file filesystem javascript worker)

> File System API missing in web workers
> --------------------------------------
>
>                 Key: CB-10492
>                 URL: https://issues.apache.org/jira/browse/CB-10492
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>         Environment: all
>            Reporter: Jim Mont
>              Labels: file, filesystem, javascript, triaged, worker
>
> All File system APIs (provided by cordova-plugin-file) appear to be missing in web workers.
 Oddly I can make XMLHttpRequests of the filesystem with file urls in workers.
> In the main view running the following suggests there is no access to the filesystem
directly:
> {code:javascript}
> var blob = new Blob(["onmessage = function(e) { var res, fn, msg; try{ fn = new Function(e.data);
res = fn(); msg = JSON.stringify(res); }catch(err){ msg = JSON.stringify(err); }; postMessage(msg+'
<> '+fn); }"]);
> var blobURL = window.URL.createObjectURL(blob);
> var worker = new Worker(blobURL);
> worker.onmessage = function(e) {
>   console.log('worker',e)
> };
> worker.postMessage('return 1+1');
> worker.postMessage('return self.File');
> worker.postMessage('return self.requestFileSystem');
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message