Project

General

Profile

Feature #69

[Roadmap 7][Milestone] Facilitate bundling HTML/XML/JSON and other data with a fix

Added by koszko about 2 years ago. Updated over 1 year ago.

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

0%

Estimated time:

Description

Consider fixes like that for Google Sheets1. 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

Roadmap


Related issues

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

Actions
Blocks Haketilo - Feature #108: [Roadmap 7] Further means of user-controlled customization of sitesNew02/24/2022

Actions

History

#1

Updated by koszko about 2 years ago

  • Related to Feature #70: [Roadmap 7][Milestone] Add facility to replace sites' original HTML with custom one added
#2

Updated by jahoti about 2 years ago

I've seen this, and will reply later.

#3

Updated by jahoti about 2 years 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 almost 2 years 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

#5

Updated by koszko over 1 year ago

  • Subject changed from Facilitate bundling HTML/XML/JSON and other data with a fix to [Roadmap 7][Milestone] Facilitate bundling HTML/XML/JSON and other data with a fix
  • Description updated (diff)
#6

Updated by koszko over 1 year ago

  • Blocks Feature #108: [Roadmap 7] Further means of user-controlled customization of sites added
#7

Updated by koszko over 1 year ago

  • Description updated (diff)
#8

Updated by colby over 1 year ago

jahoti wrote:

Using the script tag is probably an abuse of their purpose

Without commenting on the overall merit of the milestone:

Such "data blocks" are an officially recognized use of script elements, with appropriate instructions in the HTML spec to implementors for how to handle non-JS mimetypes.

#9

Updated by koszko over 1 year ago

colby wrote:

jahoti wrote:

Using the script tag is probably an abuse of their purpose

Without commenting on the overall merit of the milestone:

Does that mean you have some comments to make but you're holding them for now? Please share with us anything that might be useful.

Such "data blocks" are an officially recognized use of script elements, with appropriate instructions in the HTML spec to implementors for how to handle non-JS mimetypes.

Thanks for noting that

Also available in: Atom PDF