Very big question! I'm sitting here thinking it over now! One thing you could do is create a JavaScript object / array to "map" the files and their paths along with your created object URLs. Then use JavaScript to replace the relative paths with the absolute URLs of the objects. If ... you cannot get the file path.
If so, then you might be interested in the JavaScript library, which will be JSZip , which can give you paths for files in a ZIP archive.

For your map, you can do something like this (after you remove the necessary parts from the JSZip path, as the root directory):
var map = [ {"relativePath":"css.css","absolutePath":*Object URL Goes Here*} ];
Then skip each entry on the map and replace each instance of relativePath [x] with absolutePath [x] in this file, whether it be raw text in a file or innerHTML iframe.
Hope this helps!
source share