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

ASF GitHub Bot commented on CB-6532:
------------------------------------

GitHub user loufranco opened a pull request:

    https://github.com/apache/cordova-plugin-file/pull/55

    CB-6532 iOS: a cdvfile:// to a CSS file doesn't work in a link tag

    The issue is that there's a bug in UTTypeCopyPreferredTagWithClass, It 
returns nil mimetype for css (sometimes -- it appears that it happens when 
there is no network).  There is already a workaround for other files -- the 
JIRA case indicates that this might be true for fonts as well.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/loufranco/cordova-plugin-file master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-file/pull/55.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #55
    
----
commit 043468284496733f5b1e06f9d9c5d6f0866cfa75
Author: Lou Franco <lfra...@greenwave-solutions.com>
Date:   2014-06-24T22:24:48Z

    UTTypeCopyPreferredTagWithClass returns nil mimetype for css when there is 
no network

----


> 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