Skip to content

How do I cast the output of value()? #30

@pathikrit

Description

@pathikrit

I am trying to do something like this:

<input id="test">Hello!</input>

import io.udash.wrappers.jquery._

// Read from Scala
val x = jQ("#test").value().asIntanceOf[String]
assert(x === "Hello!")

But, I get a ClassCastException saying String | Int | Double | js.Array[Any] cannot be cast to a String

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions