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.
Readonly InternalbuffersThe buffer base classes, for tooling holding only a LiveSocket handle: they are not otherwise reachable from a page it did not bundle.
InternalcurrentInternaldisconnectedInternaldomInternalloaderInternallocalInternalmainInternalparamsInternalRenderingInternalunloadedInternaluploadersInternal
Internal
Installs a rendered buffer: what the renderer writes rendered HTML through.
A buffer can observe or annotate the output — for example to mark which HEEx function components re-rendered, for a debugging overlay. See RenderingBuffer for the protocol a buffer implements.
It applies to views that are already mounted as well as to views that join later, and nothing is re-rendered to install it: it sees each part of the page the next time a patch renders that part, so a buffer that annotates the output leaves whatever is already in the DOM untouched until then.
const previous = liveSocket.attachDebugBuffer(MyBuffer)
a class extending RenderingBuffer.
The class installed until now, to restore it with.
Internal
Internal
Internal
Internal
Internal
Internal
Internal
Internal
Internal
Connects to the LiveView server.
Internal
Internal
Internal
Disables debugging.
Disables latency simulation.
Disables profiling.
Disconnects from the LiveView server.
Optionalcallback: () => voidInternal
Internal
Internal
Internal
Internal
Enables 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.
Internal
Executes an encoded JS command, targeting the given element.
See Phoenix.LiveView.JS for more information.
Internal
Internal
Internal
Internal
Returns the current latency simulation upper bound.
Returns the Phoenix Socket instance.
Internal
Internal
Internal
Internal
Returns true if debugging is disabled. See enableDebug and disableDebug.
Returns true if debugging is enabled. See enableDebug and disableDebug.
Internal
Internal
Returns true if profiling is enabled. See enableProfiling and disableProfiling.
Internal
Internal
Internal
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.
Internal
Internal
Optionaldiagnostic: {Internal
Internal
Internal
Internal
Internal
Internal
Internal
Optionallog: anyCan be used to replace the transport used by the underlying Phoenix Socket.
Internal
Internal
anytime we are navigating or connecting, drop reload cookie in case we issue the cookie but the next request was interrupted and the server never dropped it
Internal
Internal
Internal
Internal
Internal
Internal
Internal
Returns the version of the LiveView client.
Internal
Internal
Optionalcallback: any
Creates a new LiveSocket instance.