OctaStar. Scripts
(octa_star v0.2.0)
Copy Markdown
Script helpers implemented through Datastar element patches.
Summary
Functions
Logs a message in the browser console.
Executes JavaScript by appending a <script> element to body.
Formats an execute-script element patch without writing to a connection.
Redirects the browser to a URL.
Functions
@spec console_log(Plug.Conn.t(), term(), keyword()) :: Plug.Conn.t()
Logs a message in the browser console.
@spec execute(Plug.Conn.t(), String.t(), keyword()) :: Plug.Conn.t()
Executes JavaScript by appending a <script> element to body.
Formats an execute-script element patch without writing to a connection.
@spec redirect(Plug.Conn.t(), String.t(), keyword()) :: Plug.Conn.t()
Redirects the browser to a URL.