Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6532

cdvfile file url is not working with link tag like css

    XMLWordPrintableJSON

Details

    Description

      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.

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              patrickdu Patrick Dürsteler
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: