preload

slinky.web.html.preload$
object preload extends Attr

audio - This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:

  • none: indicates that the audio should not be preloaded;
  • metadata: indicates that only audio metadata (e.g. length) is fetched;
  • auto: indicates that the whole audio file could be downloaded, even if the user is not expected to use it;
  • the empty string: synonym of the auto value.

If not set, its default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to metadata.

Usage notes:

  • The autoplay attribute has precedence overĀ preload. If autoplay is specified, the browser would obviously need to start downloading the audio for playback.
  • The browser is not forced by the specification to follow the value of this attribute; it is a mere hint. video - This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:
  • none: indicates that the video should not be preloaded.
  • metadata: indicates that only video metadata (e.g. length) is fetched.
  • auto: indicates that the whole video file could be downloaded, even if the user is not expected to use it.
  • the empty string: synonym of the auto value.

If not set, its default value is browser-defined (i.e. each browser may have its default value). The spec advises it to be set to metadata.

Usage notes:

  • The autoplay attribute has precedence over preload. If autoplay is specified, the browser would obviously need to start downloading the video for playback.
  • The specification does not force the browser to follow the value of this attribute; it is a mere hint.

Attributes

Graph
Supertypes
trait Attr
class Object
trait Matchable
class Any
Self type
preload.type

Members list

Concise view

Type members

Classlikes

object tag extends TagElement

Attributes

Graph
Supertypes
class TagElement
class Object
trait Matchable
class Any
Self type
tag.type

Types

Inherited types

type supports[T <: Tag] = AttrPair[attrType] => AttrPair[tagType]

Attributes

Inherited from:
Attr

Value members

Concrete methods

def :=(v: String): AttrPair[_preload_attr.type]
def :=(v: Option[String]): OptionalAttrPair[_preload_attr.type]