Skip to content

Add HTMLAnchorElement#download #784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,7 @@ HTMLAnchorElement[JC] var contentEditable: String
HTMLAnchorElement[JC] def dataset: js.Dictionary[String]
HTMLAnchorElement[JC] var dir: String
HTMLAnchorElement[JC] def dispatchEvent(evt: Event): Boolean
HTMLAnchorElement[JC] var download: String
HTMLAnchorElement[JC] var draggable: Boolean
HTMLAnchorElement[JC] var filters: Object
HTMLAnchorElement[JC] def firstChild: Node
Expand Down
1 change: 1 addition & 0 deletions api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,7 @@ HTMLAnchorElement[JC] var contentEditable: String
HTMLAnchorElement[JC] def dataset: js.Dictionary[String]
HTMLAnchorElement[JC] var dir: String
HTMLAnchorElement[JC] def dispatchEvent(evt: Event): Boolean
HTMLAnchorElement[JC] var download: String
HTMLAnchorElement[JC] var draggable: Boolean
HTMLAnchorElement[JC] var filters: Object
HTMLAnchorElement[JC] def firstChild: Node
Expand Down
6 changes: 6 additions & 0 deletions dom/src/main/scala/org/scalajs/dom/HTMLAnchorElement.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ import scala.scalajs.js.annotation._
@JSGlobal
abstract class HTMLAnchorElement extends HTMLElement {

/** A string indicating that the linked resource is intended to be downloaded rather than displayed in the browser.
* The value represent the proposed name of the file. If the name is not a valid filename of the underlying OS,
* browser will adapt it.
*/
var download: String = js.native

/** Is a DOMString that reflects the rel HTML attribute, specifying the relationship of the target object to the link
* object.
*/
Expand Down