|
|
|
|
|
by ZenoArrow
7 days ago
|
|
> how do you define a document? I would say a contained set of words, sometimes accompanied by static visual data (e.g. images), which aimed to convey ideas or information. For example, a post on a recipe blog website can be seen as a document, even if there are sometimes some interactive elements (like being able to change ingredient amounts based on desired portion sizes), and even if there's usually a CMS behind the scenes helping the website author update their recipes, as the written recipe is at the core of what is being transmitted. On websites the wide array of interactive elements do blur the lines between documents and apps, but the web was designed as a document sharing medium first and had app functionality bolted onto it afterwards. It's perfectly possible to have a website with zero JavaScript. I don't know if that fully answers your question, but hopefully it's of some use. |
|
normally, when i think of a document, i think of something that is to be printed / printable properly. this puts javascript out of the picture for the most part, though not necessarily entirely. some pages sadly don't even load their content without javascript these days, like SPAs, or require custom streaming.
i needed to print directions from google maps one time for example, and even the inbuilt solution is basically just a fancy print screen of a page that was mostly rendered with javascript (or similar, i don't know their tech stack, not necessarily relevant). but then this brings about the idea that the page can be interactive, while exposing an end result that is printable.
or consider css. modern css has animations. one can even implement a navbar without any js, just pure css (and i very much appreciate when people do!). i'd permit media queries, but i'm not sure about fancy animated effects.
another thing i might want to bring up is grafana. it's just interactive charts. if i disable the autorefresh, it's not live either. requires javascript, but i believe if someone wanted to chart something some other way that is not grafana, it's possible to do some visualizations with just css alone as well in a way that is manipulable. end result is again static. i could conceivably print it.
i'm not even sure pure html, with no embedded js and css, escapes the non-document fate guaranteed. video tags include videos after all.
for me the bigger question is usually how much arbitrary execution a website requires instead. if it's all fixed function stuff, like html or css, i'd grade that higher than i'd websites requiring arbitrary code execution. but then technically modern fonts are also virtual machine bytecode that is executed during font rendering, so even just putting text on the screen can require arbitrary code execution. and even if we don't go that far, you do need to hold onto some state, since html is not a regular language for example (cue can't parse html with regex meme). and this isn't even getting into all the weird and whacky multimedia formats.