You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
Brackets' Filesystem implementation is swappable, which is great, and let's one run in environments other than a native appshell. For example, I'm using an IndexedDB/WebSQL backed filesystem to run Brackets in a browser, and things mostly "Just Work." However, there are still aspects of the code that assume resources are available via a local, native filesystem, the worst being uses of file:/// URIs for loading resources like images.
A better solution is to use the Filesystem to load the resource into a BLOB, and then create a URL Object that can be used with img.src and the like. This is how I get the LiveDev to work in the browser, by having the LiveDev server pre-fetch filesystem resources and turn them into BLOBs and URL Objects that can be "served" to an iframe-based browser.
The down side is that getting the URL becomes an asynchronous operation because it now depends on reading from the filesystem. But doing so would mean that Brackets can work unchanged on top of any filesystem implementation.
The text was updated successfully, but these errors were encountered:
I see that file:/// is also used in LiveDevolopment-tests.js, and some other fils too (12 from a find in files search). Have to look at this.
But wait; did i just read that you are running brackets in a web browser 😮
Brackets' Filesystem implementation is swappable, which is great, and let's one run in environments other than a native appshell. For example, I'm using an
IndexedDB
/WebSQL
backed filesystem to run Brackets in a browser, and things mostly "Just Work." However, there are still aspects of the code that assume resources are available via a local, native filesystem, the worst being uses offile:///
URIs for loading resources like images.A better solution is to use the Filesystem to load the resource into a BLOB, and then create a URL Object that can be used with
img.src
and the like. This is how I get the LiveDev to work in the browser, by having the LiveDev server pre-fetch filesystem resources and turn them into BLOBs and URL Objects that can be "served" to an iframe-based browser.Some of the places that need this fix include:
QuickView:
Image View:
The down side is that getting the URL becomes an asynchronous operation because it now depends on reading from the filesystem. But doing so would mean that Brackets can work unchanged on top of any filesystem implementation.
The text was updated successfully, but these errors were encountered: