Skip to content

It looks we are missing some methods from the FormData class #798

Closed
@G-yhlee

Description

@G-yhlee

In js world ,

FormData Object have append and get method,

// example ) https://developer.mozilla.org/en-US/docs/Web/API/FormData/get
const formData = new FormData(event.target);
formData.append("username", "Chris");
formData.append("username", "Bob");
formData.get("username"); // Returns "Chris"

but scalajs FormData class has only append method,
we need to add get method like this...

// current  
formData.asInstanceOf[js.Dynamic].get("username").asInstanceOf[String]

// todo :  add get method
formData.get("username")

ref.

class FormData(form: HTMLFormElement = js.native) extends js.Object {

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions