Project

General

Profile

Feature #69

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

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

Status:
New
Priority:
Normal
Assignee:
-
Start date:
08/02/2021
Due date:
% Done:

0%

Estimated time:

Description

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

[1] https://git.koszko.org/hachette_fixes_tmp/tree/phttps___docs.google.com_spreadsheets_d___.json


Related issues

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

Actions

History

#1

Updated by koszko 4 months ago

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

Updated by jahoti 4 months ago

I've seen this, and will reply later.

#3

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.

#4

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