Labels.js
10th September 2002
Spotted on youngpup: Labels.js: A Re-Introduction to DHTML (from December 2001).
Although simple, Labels.js is an example of my ideal DHTML script, and an example of what I believe the W3C had in mind for the DOM. Some of the design goals that it meets are:
- Completely modular design. Labels.js uses event listeners exclusively to avoid interference with any other scripts or functionality. It does not require any special “initialization”, and it does not modify it’s environment.
- Unitializes itself before page unload so that a label will never be submitted as the value of a form field to a server process. This is consistent with the idea of complete modularity.
- Built on the DOM. Instead of using it’s own complex custom object heirarchies, Labels.js is essentially glue code stringing together the existing functionality in the DOM.
- Does not require any extra presentational or behavioral information beyond what is present in the underlying XHTML.
- Degrades beautifully to it’s structural components: a label and a textbox.
The same elegant approach to DHTML can be seen in Stuart’s aqTree javascript tree system.
More recent articles
- Weeknotes: Llama 3, AI for Data Journalism, llm-evals and datasette-secrets - 23rd April 2024
- Options for accessing Llama 3 from the terminal using LLM - 22nd April 2024
- AI for Data Journalism: demonstrating what we can do with this stuff right now - 17th April 2024
- Three major LLM releases in 24 hours (plus weeknotes) - 10th April 2024
- Building files-to-prompt entirely using Claude 3 Opus - 8th April 2024
- Running OCR against PDFs and images directly in your browser - 30th March 2024
- llm cmd undo last git commit - a new plugin for LLM - 26th March 2024
- Building and testing C extensions for SQLite with ChatGPT Code Interpreter - 23rd March 2024
- Claude and ChatGPT for ad-hoc sidequests - 22nd March 2024
- Weeknotes: the aftermath of NICAR - 16th March 2024