Build Web components with SE
SE Web keeps HTML, CSS, and browser concepts recognizable while reusing make, indentation, and familiar SE control flow.
Components
Web components reuse make. html, css, and js sections are associated with each component instance.
make Button text
html
button text
css
padding 12
border_radius 8
js
when click
say textPages & routing
Declare multiple pages; the generated router uses the History API for navigation.
page "/"
Home
page "/settings"
Settings
page "/about"
AboutHTML + CSS
HTML tags remain Web concepts, while CSS properties can use SE-style underscores such as border_radius.
html
main
h1 "Hello"
p "Welcome"
css
padding 12
background "white"
button:hover
opacity 0.8Browser behavior
Event code supports common assignments, conditions, loops, error handling, and supported async browser operations.
js
when click
count += 1
if count >= 10
say "10+"
else
say countBrowser API
Requests, JSON, forms, uploads, navigation, cancellation, and common DOM helpers.
Requests & async
options = [
"timeout": 8000,
"retries": 2,
"throw_http": true
]
task = browser.get_json "/api/users" options
result = async.await task
say result.dataNavigation & DOM
browser.go "/settings"
browser.back()
browser.text "#status" "Saved"
browser.set_value "#name" "SE"
browser.disable "#save"Browser API helper list
The request, navigation, DOM, and cancellation helpers documented for 0.8.
browser.request
browser.get
browser.get_json
browser.post
browser.post_json
browser.put_json
browser.patch_json
browser.delete
browser.submit_json
browser.upload
browser.cancel
browser.cancel_all
browser.form_json
browser.go
browser.replace
browser.back
browser.forward
browser.reload
browser.open
browser.text
browser.value
browser.set_value
browser.show
browser.hide
browser.disable
browser.enable
browser.attr
browser.html
browser.pretty
browser.onlineNative escape hatch
For Web platform features not yet mapped by SE Web, use native inside html, css, or js sections.
html
native "<dialog open>Advanced HTML</dialog>"
css
native "accent-color: auto;"
js
native "console.info('native browser code')"Build output
se web build app.se dist
# dist/
# index.html
# style.css
# app.js
# app.ts