[ 
https://issues.apache.org/jira/browse/CB-6532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13983509#comment-13983509
 ] 

Ian Clelland commented on CB-6532:
----------------------------------

A couple more:

* {{cdvfile://localhost/test.css}} isn't a valid cdvfile URL -- I would have 
expected either {{cdvfile://localhost/temporary/test.css}} or 
{{cdvfile://localhost/persistent/test.css}}. Is this actually the URL you are 
seeing?
* What version of the File plugin are you using? If it's 1.0.1 or less, then 
try updating to version 1.1.0, released last week. The {{entry.toURL()}} method 
should now be returning a {{file:///}} URL if at all possible, which should 
work as the {{href}} attribute of a {{link}} tag.

> cdvfile file url is not working with link tag like css 
> -------------------------------------------------------
>
>                 Key: CB-6532
>                 URL: https://issues.apache.org/jira/browse/CB-6532
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File, Plugin File Transfer
>    Affects Versions: 3.4.0
>         Environment: iOS 7 
>            Reporter: Patrick Dürsteler
>            Priority: Critical
>
> A css downloaded with xhr and created a local url 
> (cdvfile://localhost/test.css) with the File API can't be used as a 
> stylesheet.
> {code}
> var filename = "test.css";
> var imageURL = "http://apache.org/css/style.css";;
> requestFileSystem(TEMPORARY, 0, function(fileSystem) {
>     var ft = new FileTransfer();
>     ft.download(imageURL, fileSystem.root.toURL() + "/" + filename, 
> function(entry) {
>          var fileref=document.createElement("link");
>          fileref.setAttribute("rel", "stylesheet");
>          fileref.setAttribute("type", "text/css");
>            fileref.setAttribute("href", entry.toURL());
>         document.head.appendChild(imgElement);
>     });
> });
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to