You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
h.OnRunInterval(time.Duration, commands ... Command)
Allows you to run JS commands on the specific interval
Usage:
h.Div(
h.OnLoad(
h.RunOnInterval(time.Second,
js.ConsoleLog("this runs a command every 1s"),
js.SetInnerHtml(h.Div()),
),
)
)
h.RunAfterTimeout(time.Duration, commands ... Command)
Allows you to run JS commands after a specified timeout
h.Div(
h.OnLoad(
h.RunAfterTimeout(time.Second,
js.ConsoleLog("this runs a command once after a second"),
js.SetInnerHtml(h.Div()),
),
)
)
Additional fixes:
Fixes issues where using simple commands such as js.SetText, js.SetInnerHtml were failing when used in things such as Js.EvalCommands due to 'this' not existing. Commands will now always use 'self' if it exists, otherwise 'this'
This discussion was created from the release V1.0.5.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Small release this time, added 2 new JS commands
Allows you to run JS commands on the specific interval
Usage:
Allows you to run JS commands after a specified timeout
Additional fixes:
Fixes issues where using simple commands such as js.SetText, js.SetInnerHtml were failing when used in things such as Js.EvalCommands due to 'this' not existing. Commands will now always use 'self' if it exists, otherwise 'this'
This discussion was created from the release V1.0.5.
Beta Was this translation helpful? Give feedback.
All reactions