Skip to content

Wishlist: binding for: new Image #10

@udhos

Description

@udhos

Want constructor for javascript Image.

I am currently using this work-around:

func newImage() *js.Object {
    return js.Global.Call("eval", "(new Image())")
}

image := newImage()
image.Set("onload", func() {
    //go onLoad(gl, t, textureURL) // call onload handling goroutine
})
image.Set("src", textureURL)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions