The WebSocket endpoint URL, e.g., "wss://example.com/live", or "/live" to inherit the host and protocol.
The required Phoenix Socket class imported from "phoenix". For example:
import {Socket} from "phoenix"
import {LiveSocket} from "phoenix_live_view"
let liveSocket = new LiveSocket("/live", Socket, {...})
Optional configuration.
Connects to the LiveView server.
Disables debugging.
Disables latency simulation.
Disables profiling.
Disconnects from the LiveView server.
Optionalcallback: () => voidEnables debugging.
When debugging is enabled, the LiveView client will log debug information to the console. See Debugging client events for more information.
Enables latency simulation.
When latency simulation is enabled, the LiveView client will add a delay to requests and responses from the server. See Simulating Latency for more information.
Enables profiling.
When profiling is enabled, the LiveView client will log profiling information to the console.
Executes an encoded JS command, targeting the given element.
See Phoenix.LiveView.JS for more information.
Returns the current latency simulation upper bound.
Returns the Phoenix Socket instance.
Returns true if debugging is disabled. See enableDebug and disableDebug.
Returns true if debugging is enabled. See enableDebug and disableDebug.
Returns true if profiling is enabled. See enableProfiling and disableProfiling.
Returns an object with methods to manipulate the DOM and execute JavaScript. The applied changes integrate with server DOM patching.
See JavaScript interoperability for more information.
Can be used to replace the transport used by the underlying Phoenix Socket.
Returns the version of the LiveView client.
Creates a new LiveSocket instance.