cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "165537 (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-6532) cdvfile file url is not working with link tag like css
Date Wed, 02 Jul 2014 02:31:25 GMT

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

165537 commented on CB-6532:
----------------------------

[~iclelland]

I posted a question on Stackoverflow http://stackoverflow.com/q/22801511/276648
Basically I just have some local HTML/JS/CSS files (so whether there's network connectivity
or not shouldn't be a problem, but in my case there was network connectivity through local
WiFi) and none of my styles appeared correctly in iOS. Everything else works fine (link to
other pages, loading javascript files).

I haven't tried recompiling the app with the PR from Louis Franco.

> 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)

Mime
View raw message