Skip to Content
defold-typescript
Get startedGuidesAPILibraries
Global types

Url

A message-passing address with socket, path, and fragment components.

Each field is writable and takes a Hash or a string, which the engine hashes. Every field reads undefined when unset, so narrow it before use. A socket-only address (msg.url("main:")) has no path. socket is unset on the sender of an engine message posted with no sender, such as ray_cast_response and ray_cast_missed from physics.raycast_async, animation_done from a model.play_anim with no callback, and window_resized in a render script, and after url.socket = undefined. Assigning undefined clears any of the three fields.

Properties

socket: Hash | undefined

path: Hash | undefined

fragment: Hash | undefined

On this page