https://github.com/cookiengineer/golem
:smiling_imp: :boom: :gun: Go DOM bindings/library for static pages that want to be dynamic
https://github.com/cookiengineer/golem
Last synced: 4 months ago
JSON representation
:smiling_imp: :boom: :gun: Go DOM bindings/library for static pages that want to be dynamic
- Host: GitHub
- URL: https://github.com/cookiengineer/golem
- Owner: cookiengineer
- Created: 2024-07-31T11:22:47.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-10-16T20:53:12.000Z (8 months ago)
- Last Synced: 2025-02-04T05:08:20.658Z (4 months ago)
- Language: Go
- Homepage:
- Size: 2.17 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Golem UI
Opinionated Web UI framework for Go that is made for stateless HTML in both Web Pages
and Web Views. It bridges the gap between Go, WebAssembly, and Browser APIs.# Opinions
**HTML Elements**
- Static elements are never removed from the DOM
- Static elements can have DOM event listeners
- Elements with an `id` property are static elements
- Dynamic elements can be removed from the DOM
- Dynamic elements cannot have DOM event listeners**Web Forms**
- Web Forms are static elements
- Web Forms with `enctype="application/json"` use a REST compatible API endpoint
- Web Forms with an `action` URL are automatically validateable
- Web Forms are serializable via `json.Marshal()` into a `struct`
- Web Forms are validateable via an `interface` with `Validate() bool, err`**Web Clients**
- Web Clients are REST API clients
- Web Clients are validateable via an `interface` with `Validate() bool, err`
- Web Clients are routable via a `map[URL]struct` for each supported route# Bindings
- [x] [Document](/source/Document.go)
- [x] [Screen](/source/Screen.go)
- [x] [ScreenOrientation](/source/ScreenOrientation.go)
- [x] [Window](/source/Window.go)**animations**
- [x] [animations/CancelAnimationFrame](/source/animations/CancelAnimationFrame.go)
- [x] [animations/RequestAnimationFrame](/source/animations/RequestAnimationFrame.go)**dom**
- [x] [dom/Element](/source/dom/Element.go)
- [x] [dom/Event](/source/dom/Event.go)
- [x] [dom/EventListener](/source/dom/EventListener.go)
- [x] [dom/EventPhase](/source/dom/EventPhase.go)
- [x] [dom/EventType](/source/dom/EventType.go)**location**
- [x] [location/Location](/source/location/Location.go)
**navigator**
- [x] [navigator/Geolocation](/source/navigator/Geolocation.go)
- [x] [navigator/GeolocationPosition](/source/navigator/GeolocationPosition.go)
- [x] [navigator/GeolocationPositionError](/source/navigator/GeolocationPositionError.go)
- [x] [navigator/GeolocationPositionOptions](/source/navigator/GeolocationPositionOptions.go) [1]**storages**
- [x] [storages/LocalStorage](/source/storages/LocalStorage.go)
- [x] [storages/SessionStorage](/source/storages/SessionStorage.go)**timers**
- [x] [timers/ClearInterval](/source/timers/ClearInterval.go)
- [x] [timers/ClearTimeout](/source/timers/ClearTimeout.go)
- [x] [timers/SetInterval](/source/timers/SetInterval.go)
- [x] [timers/SetTimeout](/source/timers/SetTimeout.go)[1] This feature is implemented, but not supported across all Browsers. It is disabled to prevent WebASM runtime errors that are irrecoverable.
# Layouts
- [ ] fixed content, single sidebar
- [ ] scroll content, single sidebar
- [ ] fixed content, dual sidebar
- [ ] scroll content, dual sidebar# Usage
TBD
# License
MIT