Feature #69

Facilitate bundling HTML/XML/JSON and other data with a fix

Added by koszko 4 months ago. Updated 2 days ago.

Start date:
Due date:
% Done:


Estimated time:


Consider fixes like that for Google Sheets[1]. They heavily use document.createElement() to construct parts of user interface in javascript. While this works, it is not as convenient, as if the interface was specified using actual HTML/XML code. Bundling pieces of HTML/XML would allow us to focus only on important things in actual scripts.

The ability to bundle other kinds of data (plain text, JSON, images, other binary files) would also be useful.

It is yet to be decided how bundled data files should be injected into page. Perhaps it would be possible to use something like <script type="application/octet-stream">**data goes here**</script> appended at the end of document's body? Perhaps it would be safer to make the data available straight to injected scripts through global variables? Or perhaps it should be injected into DOM as base64-encoded embedded files?

Please share your thoughts.

In case of doubt, this relates to the new API


Related issues

Related to Haketilo - Feature #70: Add facility to replace sites' original HTML with custom oneNew08/02/2021




Updated by koszko 4 months ago

  • Related to Feature #70: Add facility to replace sites' original HTML with custom one added

Updated by jahoti 4 months ago

I've seen this, and will reply later.


Updated by jahoti 4 months ago

We definitely need to support this; the question is, as you point out, how. Using the script tag is probably an abuse of their purpose, so I might advise against that; either of the other two options seems good, however, provided we can settle where exactly the base64-encoded files would go in the DOM.


Updated by koszko 2 days ago

  • Description updated (diff)

To facilitate bypassing CORS we'd like to implement something like GreaseMonkey's GM_xmlhttpRequest (mentioned here). Once we do this, it'd make sense to also have the bundled resources available through it. We could also provide an API to get URLs for that content and therefore decrease the amount of copying

Also available in: Atom PDF