apropos/guile-web
1
1
Fork
You've already forked guile-web
0
[WIP] Guile Scheme bindings for the Document Object Model.
  • JavaScript 52.8%
  • Scheme 47.2%
2026年03月29日 00:21:24 -07:00
web briefly update media.scm and canvas.scm 2026年03月29日 00:21:24 -07:00
LICENSE update README and license 2026年03月29日 00:21:24 -07:00
manifest.scm init 2025年09月21日 15:03:45 -07:00
README.md update README and license 2026年03月29日 00:21:24 -07:00
reflect.js init 2025年09月21日 15:03:45 -07:00
reflect.wasm init 2025年09月21日 15:03:45 -07:00
web.js initial impl of the node/element modules 2025年09月22日 10:27:56 -07:00
wtf8.wasm init 2025年09月21日 15:03:45 -07:00

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