Add fonts, autotable, autotable examples
This commit is contained in:
49
go/wasmruntime/host_native.go
Normal file
49
go/wasmruntime/host_native.go
Normal file
@@ -0,0 +1,49 @@
|
||||
//go:build !(js && wasm)
|
||||
|
||||
package wasmruntime
|
||||
|
||||
import "kjol/vdom"
|
||||
|
||||
// The server half of the host API (see host.go). Nothing here touches a browser,
|
||||
// because there isn't one: measurements are zero, listeners are never installed,
|
||||
// timers never fire, storage is always empty. Components call these
|
||||
// unconditionally and render their unmeasured state, which is what SSR ships.
|
||||
|
||||
func Measure(*vdom.Ref) Rect { return Rect{} }
|
||||
func Viewport() Size { return Size{} }
|
||||
func CSSVarPx(string) float64 { return 0 }
|
||||
|
||||
func RAF(func()) int { return 0 }
|
||||
func CancelRAF(int) {}
|
||||
func AfterRender(func()) {}
|
||||
|
||||
func SetStyle(*vdom.Ref, string, string) {}
|
||||
func RemoveStyle(*vdom.Ref, string) {}
|
||||
func SetText(*vdom.Ref, string) {}
|
||||
func SetHTML(*vdom.Ref, string) {}
|
||||
|
||||
func Focus(*vdom.Ref) {}
|
||||
func Blur(*vdom.Ref) {}
|
||||
func SelectionRange(*vdom.Ref) (int, int) { return 0, 0 }
|
||||
func SetSelectionRange(*vdom.Ref, int, int) {}
|
||||
func ScrollIntoView(*vdom.Ref, bool, string) {}
|
||||
func ScrollLeft(*vdom.Ref) float64 { return 0 }
|
||||
func SetScrollLeft(*vdom.Ref, float64) {}
|
||||
|
||||
func Contains(*vdom.Ref, any) bool { return false }
|
||||
func ClosestAttr(any, string, string) (string, bool) { return "", false }
|
||||
func QuerySelector(string) *vdom.Ref { return vdom.NewRef() }
|
||||
|
||||
func OnWindow(string, bool, func(vdom.Event)) Unsub { return func() {} }
|
||||
func OnDocument(string, bool, func(vdom.Event)) Unsub { return func() {} }
|
||||
func ObserveResize(*vdom.Ref, func()) Unsub { return func() {} }
|
||||
|
||||
func SetTimeout(int, func()) int { return 0 }
|
||||
func ClearTimeout(int) {}
|
||||
|
||||
func StorageGet(string) (string, bool) { return "", false }
|
||||
func StorageSet(string, string) {}
|
||||
func StorageRemove(string) {}
|
||||
|
||||
func Download(string, string, []byte) {}
|
||||
func Print(string, []byte) {}
|
||||
Reference in New Issue
Block a user