Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gi_load.js interacts with the DOM #45

Open
erkyrath opened this issue Sep 10, 2020 · 2 comments
Open

gi_load.js interacts with the DOM #45

erkyrath opened this issue Sep 10, 2020 · 2 comments

Comments

@erkyrath
Copy link
Owner

The intent of Quixe is that it should work as a module, delegating all DOM manipulation to glkote.js.

However, there are places in gi_load.js where this breaks down.

  • The absolutize() function relies on a DOM trick.
  • unpack_blorb() uses jQuery to decode HTML text data (the metadata chunk) into a dict.
  • unpack_blorb() uses jQuery in various ways to get JS code loaded.

All of these should have alternatives when running, e.g., as a Node module.

@curiousdannii
Copy link
Contributor

curiousdannii commented Sep 10, 2020

The URL api will help with the first, it's a global in both browsers and Node. Actually also for making URLs for images - using blobs should make it basically as efficient as external files.

I've actually wondered if the blorb/image stuff could be moved to the GlkOte repo. Any GlkOte+RemGlk type setup will need it, but it won't need the load code.

@erkyrath
Copy link
Owner Author

erkyrath commented Dec 9, 2020

Used the URL api for absolutize(), as noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants