Summary
Functions
Calls a function from the current scope (imported binding or global).
Calls a method on a JS receiver.
Deletes a property from a JS receiver.
Dispatches a JavaScript event on a target element.
Evaluates a JavaScript expression and returns the result.
Executes JavaScript code.
Gets a property from a JS receiver.
Checks if a value is an instance of a JS class.
Imports the default JS export and binds it to a name that can be used as a receiver in other JS functions. The :as option is required.
Imports a named JS export and binds it to a name that can be used as a receiver in other JS functions.
Instantiates a JS class.
Sets a property on a JS receiver.
Provides a convenient syntax for executing JavaScript code using the ~JS sigil.
Returns the JavaScript type of a value.
Functions
Calls a function from the current scope (imported binding or global).
Calls a method on a JS receiver.
Deletes a property from a JS receiver.
Dispatches a JavaScript event on a target element.
Evaluates a JavaScript expression and returns the result.
Executes JavaScript code.
Gets a property from a JS receiver.
Checks if a value is an instance of a JS class.
Imports the default JS export and binds it to a name that can be used as a receiver in other JS functions. The :as option is required.
Examples
js_import from: "chart.js", as: :Chart
Imports a named JS export and binds it to a name that can be used as a receiver in other JS functions.
Examples
js_import :Chart, from: "chart.js"
js_import :Chart, from: "chart.js", as: :MyChart
Instantiates a JS class.
Sets a property on a JS receiver.
@spec sigil_JS(String.t(), []) :: :ok
Provides a convenient syntax for executing JavaScript code using the ~JS sigil.
Returns the JavaScript type of a value.