Skip to content

Commit

Permalink
add DataTransfer.SetData
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitshur committed Oct 9, 2024
1 parent 21df4d8 commit 92acb20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3129,3 +3129,7 @@ type DataTransfer struct{ *js.Object }
func (dt *DataTransfer) GetData(format string) string {
return dt.Call("getData", format).String()
}

func (dt *DataTransfer) SetData(format, data string) {
dt.Call("setData", format, data)
}
4 changes: 4 additions & 0 deletions v2/dom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3363,3 +3363,7 @@ type DataTransfer struct{ js.Value }
func (dt *DataTransfer) GetData(format string) string {
return dt.Call("getData", format).String()
}

func (dt *DataTransfer) SetData(format, data string) {
dt.Call("setData", format, data)
}

0 comments on commit 92acb20

Please sign in to comment.