Skip to content

proposal: syscall/js: Add SetSymbol method on js.Value #62339

Open
@zyxkad

Description

@zyxkad

This method should works as same as js.Value.Set, but it uses Symbol as the key.
It's useful because we can use more js syntax sugar with symbols, such as for ... of, and we don't have to write extra javascripts to wrap them.

A suggestion signature:

func (js.Value)SetSymbol(symbol js.Value, value any)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions