- JavaScript 52.8%
- Scheme 47.2%
| web | briefly update media.scm and canvas.scm | |
| LICENSE | update README and license | |
| manifest.scm | init | |
| README.md | update README and license | |
| reflect.js | init | |
| reflect.wasm | init | |
| web.js | initial impl of the node/element modules | |
| wtf8.wasm | init | |
guile-web
This wrapper is a work in progress. Currently, only random parts work, and TODOs and FIXMEs are littered throughout.
Some Guile bindings to the HTML DOM for personal use. They are generally set up in a way that I think to be sensible.
These bindings are not a 1:1 mapping with the JavaScript API: nor anywhere close. Rather, this wrapper is very careful to provide a compact, coherent, and Scheme-like interface to the web as a whole. This necessitates a total and complete revamp of the HTML DOM API. Objects writ large are reorganized into separate modules, with shared functionality merging and non-shared functionality split out. Deprecated, redundant, and insecure properties/methods are discarded completely, and the (useful) ones that remain are wrapped to use Scheme-native lists when necessary, and given a Scheme name and documented accordingly.
The new bindings are scattered across a number of modules:
- The
(web element)module contains elements, the core abstraction at the heart of this wrapper.- Elements are HTML Elements. But their interface is much simplified, removing old cruft and using new web APIs.
- The
(web node)module contains functionality for working with elements, text nodes, and comment nodes.- These objects all have a parent element, and may have siblings. That's about it! Nothing else ties these together.
- But unlike the HTML API, the methods of
(web node)are always valid on nodes.
- The
(web window)module provides (very limited) functionality on (open) browser windows.- It is much more restricted than its JavaScript counterpart, for security/privacy reasons.
- The
(web viewport)module provides functionality around the browser viewport, i.e. scrolling and the like. - The
(web dialog)module provides for pop-up dialogs of various sorts. - The following modules have yet to be fleshed out / implemented:
(web document): for stuff on the document(web events): for events and callbacks to hook functions onto(web navigation): browser history and navigation(web storage): browser storage, of various kinds(web network): network requests of various kinds(web media): audio/video multimedia(web canvas): drawing things with webgl and the javascript canvas