object download extends Attr
area - This attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource. See <a>
for a full description of the download
attribute.
a - This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want). There are no restrictions on allowed values, though /
and \
are converted to underscores. Most file systems limit some punctuation in file names, and browsers will adjust the suggested name accordingly.
Notes:
- This attribute only works for same-origin URLs.
- This attribute can be used with
blob:
URLs anddata:
URLs to download content generated by JavaScript, such as pictures created in an image-editor Web app. - If the HTTP header
Content-Disposition:
gives a different filename than this attribute, the HTTP header takes priority over this attribute. - If
Content-Disposition:
is set toinline
, Firefox prioritizesContent-Disposition
, like the filename case, while Chrome prioritizes thedownload
attribute.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- download
- Attr
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- type attrType = _download_attr.type
- Definition Classes
- download → Attr
- type supports[T <: Tag] = (AttrPair[attrType]) => AttrPair[core.Attr.supports.T.tagType]
- Definition Classes
- Attr
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def :=(v: Option[Boolean]): OptionalAttrPair[_download_attr.type]
- Annotations
- @inline()
- def :=(v: Boolean): AttrPair[_download_attr.type]
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit def boolToPairaApplied(attrObj: download.this.type): AttrPair[a.tag.type]
- Annotations
- @inline()
- implicit def boolToPairareaApplied(attrObj: download.this.type): AttrPair[area.tag.type]
- Annotations
- @inline()
- implicit def boolToPairstarApplied(attrObj: download.this.type): AttrPair[*.tag.type]
- Annotations
- @inline()
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- implicit object tag extends TagElement