You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ian Clelland (JIRA)" <ji...@apache.org> on 2014/05/23 21:30:02 UTC
[jira] [Commented] (CB-6532) cdvfile file url is not working with
link tag like css
[ https://issues.apache.org/jira/browse/CB-6532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14007573#comment-14007573 ]
Ian Clelland commented on CB-6532:
----------------------------------
[~patrickdu] -- Can you comment on this? Do you still see this problem with the latest released version of the plugin?
I'm not surprised that a cdvfile:// URL won't work in a link tag (disappointed, but not surprised,) but the latest version of the plugin should generate file:// urls for you.
> 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)