Maingron / MainOS

MainOS is a web-based Operating System
https://maingron.itch.io/mainos
10 stars 3 forks source link

Change path for accessing IOfs files through HTML #37

Open Maingron opened 3 years ago

Maingron commented 3 years ago

Chrome complains when using <img src="iofs:something">

Use a #: or something similar in future. This should also allow IOfs to serve the images instead of having to search through the document and replace the url.

Src #:something.png should result in */exec.html#something.png where helper.js could listen and return the png.

This would be such big improvement - no errors in the console, no constant checks and just cleaner. Though we have to consider that the entire programs exec.html might be run every time.

Maingron commented 1 year ago

Ugh. When starting these links with #, sometimes the links seem to break. Guess we'll have to find another, better way there. I tried to create a handler like returnIOFSfile.html, but hey, it's browser policies again. Apparently browser policies prevent showing images or anything really returned with that method.

Sooo uh, if we want to actually use something like src="#iofs:C:/..", I guess we'll have to find another way. Maybe we'll have to create an extensive path parser or something, I don't even know