Libraries.Web.Page.Audio Documentation

The Audio class represents HTML's (Hypertext Markup Language) audio tag which is used to add an audio player/content to a page. You can find more information about this tag at: The audio attribute.

Example Code


use Libraries.Web.Page.all
class Main
action main
     WebPage page
     Audio audio
     audio:SetAddress("http://www.moviesoundclips.net/download.php?id=1483&ft=wav")
     audio:SetControls(true)
     audio:SetAutoPlay(true)
   
     page:AddToBody(audio)
     output page:Generate()
end
end

Inherits from: Libraries.Web.Page.AttributeAccepter, Libraries.Web.Page.GlobalAttributeAccepter, Libraries.Web.Page.WebTag, Libraries.Web.Page.MediaAttributeAccepter, Libraries.Language.Object, Libraries.Web.Page.FlowContent

Variables Table

VariablesDescription
text preloadAutoThis is a tag that can be used in the preload option for audio. Auto specifies that the audio should be loaded automatically when the page loads.
text preloadMetadataThis is a tag that can be used in the preload option for audio. The Metadata tag means that the page should load information about the audio file to be played, but that the actual audio should not be loaded.
text preloadNoneThis is a tag that can be used in the preload option for audio. The "none" tag specifies that no information about the audio should be loaded when the page loads.

Actions Documentation

Add(Libraries.Web.Page.Attribute attribute)

This action adds an attribute to this object. If an attribute with the same name as

Parameters

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

Attribute attribute
attribute:SetName("src")
attribute:SetValue("http://www.google.com")

AttributeAccepter accept
accept:Add(attribute)

AddAttribute(text name, text value)

This action adds an attribute to this object. This action is a helper action, which essentially does the same thing as the Add(Attribute) action. If an attribute with the same name as

Parameters

  • text name: The name of the attribute functions as a key. For example, in a link, we might have a "src" and an actual address, like google.com. In this case, the name would be equivalent to the src.
  • text value: As an example of link, imagine we have a value of "src" and an actual address, like google.com. In this case, the value would be equivalent to google.com.

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")

AddClassAttribute(text value)

Adds to the ClassAttribute attribute. Multiple class names can be listed in the passed text, separated by a space.

Parameters

  • text value: The classes to be added to the element

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:AddClassAttribute("myClass")

AddNestedTag(Libraries.Web.Page.WebTag tag)

This action adds a WebTag to the list of WebTags contained within the current WebTag.

Parameters

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData


//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)

AddText(text value)

This action sets the description text for this WebTag.

Parameters

  • text value: The text contained in the WebTag.

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:AddDescription("name")
row:Add(cell)

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

Generate()

This action sets the address where the audio file resides. This address is relative to the root of the server.

Return

text:

Example


use Libraries.Web.Page.Audio

Audio audio
audio:SetAddress("resources/test.ogg")

GenerateAttributes()

This action returns a text description of all attributes stored.

Return

text:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
text result = accept:GenerateAttributes()

GenerateNestedTags()

This action generates the HTML output text of all of the nested WebTags.

Return

text: The text including all webtags within this WebTag.

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)
output row:GenerateNestedTags()

GetAccessKey()

Returns the AccessKey attribute. Specifies a shortcut key for the web element.

Return

Libraries.Web.Page.Attribute: The current AccessKey attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetAccessKey()

GetAddress()

This action returns the address where the audio file resides. This address is relative to the root of the server.

Return

Libraries.Web.Page.Attribute: This returns an attribute representing the address.

Example


use Libraries.Web.Page.Audio
use Libraries.Web.Page.Attribute

Audio audio
Attribute play = audio:GetAddress()

GetAttribute(text name)

This action returns an attribute from this object's Attributes object. If no attribute exists for a given key, this action returns undefined.

Parameters

  • text name

Return

Libraries.Web.Page.Attribute:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
//as we have not set any attribute, this would
//return undefined
Attribute attribute = accept:GetAttribute("src")

GetAttributeValue(text name)

This action returns an attribute from this object's Attributes object. If no attribute exists for a given key, this action returns undefined.

Parameters

  • text name: The key value in this case is described in more detail in the documentation for this class's Add actions.

Return

text:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
//This helper action would throw an error if "src" were not set.
text value = accept:GetAttributeValue("src")

GetAttributes()

Returns a list of all attributes on the system.

Return

Libraries.Web.Page.Attributes: The attributes class contains all of the attributes that have been set for this object.

Example



use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attributes

AttributeAccepter accept
Attributes attributes = accept:GetAttributes()

GetAutoPlay()

This action returns true if the web page will automatically try to play the specified audio file as soon as it is ready. Ready, in this context means that a sufficient amount of audio has been buffered.

Return

boolean: This returns true if the page will automatically play the file.

Example


use Libraries.Web.Page.Audio

Audio audio
boolean play = audio:GetAutoPlay()

GetClassAttribute()

Returns the ClassAttribute attribute.

Return

Libraries.Web.Page.Attribute: The current ClassAttribute attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetClassAttribute()

GetContentEditable()

Returns the ContentEditable attribute.

Return

Libraries.Web.Page.Attribute: The current ContentEditable attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetContentEditable()

GetContextMenu()

Returns the ContextMenu attribute.

Return

Libraries.Web.Page.Attribute: The current ContextMenu attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetContextMenu()

GetControls()

This action returns true if the web page will display controls for playing an audio file.

Return

boolean: This returns true if controls for adjusting the playback of the audio file will be displayed.

Example


use Libraries.Web.Page.Audio

Audio audio
boolean play = audio:GetControls()

GetDraggable()

Returns the Draggable attribute.

Return

Libraries.Web.Page.Attribute: The current Draggable attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetDraggable()

GetDropZone()

Returns the DropZone attribute.

Return

Libraries.Web.Page.Attribute: The current DropZone attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetDropZone()

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetHidden()

Returns the Hidden attribute.

Return

Libraries.Web.Page.Attribute: The current Hidden attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetHidden()

GetIdentifier()

Returns the Identifier attribute.

Return

Libraries.Web.Page.Attribute: The current Identifier attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetIdentifier()

GetIterator()

This action returns an iterator of all attributes stored in this object.

Return

Libraries.Containers.Iterator:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute
use Libraries.Containers.Iterator

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")

//output out all of the attributes
Iterator<Attribute> it =  accept:GetIterator()
repeat while it:HasNext()
    Attribute at = it:Next()
    output at:Generate()
end

GetLanguage()

Returns the Language attribute.

Return

Libraries.Web.Page.Attribute: The current Language attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetLanguage()

GetLoop()

This action returns true if the audio file played on this web page will automatically repeat itself after it is complete.

Return

boolean: This returns true if the file will play itself again after it is finished.

Example


use Libraries.Web.Page.Audio

Audio audio
boolean play = audio:GetLoop()

GetNumberOfAttributes()

This action returns the number of attributes that are currently stored in this object.

Return

integer:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
integer num = accept:GetNumberOfAttributes()

GetNumberOfNestedTags()

This action gets the number of nested tags within the current WebTag.

Return

integer: The number of nested tags.

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)
integer numTags = row:GetSize()

GetOnAbort()

Returns the OnAbort attribute. If a on abort event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnAbort attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnAbort()

GetOnCanPlay()

Returns the OnCanPlay attribute. If a can play event (a file has buffered enough to play) occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnCanPlay attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnCanPlay()

GetOnCanPlayThrough()

Returns the OnCanPlayThrough attribute. If a play all the way through (the file can play without pausing for buffering) event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnCanPlayThrough attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnCanPlayThrough()

GetOnDurationChange()

Returns the OnDurationChange attribute. If the durration of a a media file changes, this event will occur on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnDurationChange attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnDurationChange()

GetOnEmptied()

Returns the OnEmptied attribute. If the file becomes unavailable this event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnEmptied attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnEmptied()

GetOnEnded()

Returns the OnEnded attribute. If the media file reaches the end event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnEnded attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnEnded()

GetOnLoadStart()

Returns the OnLoadStart attribute. If a load event is about to start on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnLoadStart attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnLoadStart()

GetOnLoadedData()

Returns the OnLoadedData attribute. If a media loaded event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnLoadedData attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnLoadedData()

GetOnLoadedMetaData()

Returns the OnLoadedMetaData attribute. If the meta data is loaded event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnLoadedMetaData attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnLoadedMetaData()

GetOnMediaError()

Returns the OnMediaError attribute. If a load error event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnMediaError attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnMediaError()

GetOnPause()

Returns the OnPause attribute. If a pause event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnPause attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnPause()

GetOnPlay()

Returns the OnPlay attribute. If a play event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnPlay attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnPlay()

GetOnPlaying()

Returns the OnPlaying attribute. If a play event is currently firing on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnPlaying attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnPlaying()

GetOnProgress()

Returns the OnProgress attribute. If a on progress event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnProgress attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnProgress()

GetOnRateChange()

Returns the OnRateChange attribute. If a on play rate change event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnRateChange attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnRateChange()

GetOnReadyStateChange()

Returns the OnReadyStateChange attribute. If the ready state event changes on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnReadyStateChange attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnReadyStateChange()

GetOnSeeked()

Returns the OnSeeked attribute. If a seek event has occured on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnSeeked attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnSeeked()

GetOnSeeking()

Returns the OnSeeking attribute. If a seek event is currently occuring on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnSeeking attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnSeeking()

GetOnStalled()

Returns the OnStalled attribute. If a stall event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnAbort OnStalled.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnStalled()

GetOnSuspend()

Returns the OnSuspend attribute. If a on suspend event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnSuspend attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnSuspend()

GetOnTimeUpdate()

Returns the OnTimeUpdate attribute. If the playing position changes on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnTimeUpdate attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnTimeUpdate()

GetOnVolumeChange()

Returns the OnVolumeChange attribute. If a volume change event occurs on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnVolumeChange attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnVolumeChange()

GetOnWaiting()

Returns the OnWaiting attribute. If a pause event occurs and it is expected to continue on a specified element a script is fired based on this attribute.

Return

Libraries.Web.Page.Attribute: The current OnWaiting attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
Attribute attribute = accept:GetOnWaiting()

GetPreload()

This action returns information on how audio should be loaded from this tag. There are three options for passing information to this action, which are written into the constants : 1) preloadAuto, 2) preloadMetadata, and 3) preloadNone.

Auto specifies that the audio should be loaded automatically when the page loads. The Metadata tag means that the page should load information about the audio file to be played, but that the actual audio should not be loaded. The "none" tag specifies that no information about the audio should be loaded when the page loads.

Return

Libraries.Web.Page.Attribute: This returns an attribute representing the preload preference, if one exists.

Example


use Libraries.Web.Page.Audio
use Libraries.Web.Page.Attribute

Audio audio
Attribute play = audio:GetPreload()

GetSpellcheck()

Returns the Spellcheck attribute.

Return

Libraries.Web.Page.Attribute: The current Spellcheck attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetSpellcheck()

GetStyle()

Returns the Style attribute.

Return

Libraries.Web.Page.Attribute: The current Style attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetStyle()

GetTabIndex()

Returns the TabIndex attribute.

Return

Libraries.Web.Page.Attribute: The current TabIndex attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetTabIndex()

GetTag(integer index)

This action gets the number of nested tags within the current WebTag.

Parameters

  • integer index

Return

Libraries.Web.Page.WebTag: The number of nested tags.

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)
WebTag tag = row:GetTag(0)

GetTextDirection()

Returns the TextDirection attribute.

Return

Libraries.Web.Page.Attribute: The current TextDirection attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetTextDirection()

GetTitle()

Returns the Title attribute.

Return

Libraries.Web.Page.Attribute: The current Title attribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
Attribute attribute = accept:GetTitle()

HasAttribute(text name)

This action returns whether or not an attribute exists for the key passed in as a parameter.

Parameters

  • text name: The key value in this case is described in more detail in the documentation for this class's Add actions.

Return

boolean:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
//This helper action would throw an error if "src" were not set.
boolean exists = accept:HasAttribute("src")

Remove(Libraries.Web.Page.WebTag tag)

This action removes the first instance of a webtag found in the list of sub-WebTags.

Parameters

Example

use Libraries.Web.Page.TableRow
use Libraries.Web.Page.TableData

//TableRow and TableData are both WebTags
TableRow row
TableData cell
cell:SetDescription("name")
row:Add(cell)
row:Remove(cell)

RemoveAttribute(text name)

This action removes an attribute with a particular key. If that attribute does not exist, then this action returns undefined.

Parameters

  • text name: The name of the attribute that should be removed.

Return

Libraries.Web.Page.Attribute:

Example


use Libraries.Web.Page.AttributeAccepter
use Libraries.Web.Page.Attribute

AttributeAccepter accept
accept:AddAttribute("src", "http://www.google.com")
//This helper action would throw an error if "src" were not set.
accept:RemoveAttribute("src")

SetAccessKey(text value)

Sets the AccessKey attribute. Specifies a shortcut key for the web element.

Parameters

  • text value: The current AccessKey.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetAccessKey("z")

SetAddress(text value)

This action sets the address where the audio file resides. This address is relative to the root of the server.

Parameters

  • text value

Example


use Libraries.Web.Page.Audio

Audio audio
audio:SetAddress("resources/test.ogg")

SetAutoPlay(boolean value)

This action should be set to true if the web page should automatically try to play the specified audio file as soon as it is ready. Ready, in this context means that a sufficient amount of audio has been buffered. Setting this to false will remove autoplay from the page.

Parameters

  • boolean value

Example


use Libraries.Web.Page.Audio

Audio audio
audio:SetAutoPlay(true)

SetClassAttribute(text value)

Sets the ClassAttribute attribute. Specifies a class name for the element.

Parameters

  • text value: The current ClassAttribute.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetClassAttribute("myClass")

SetContentEditable(text value)

Sets the ContentEditable attribute. Specifies wether content in an element is editable.

Parameters

  • text value: The current ContentEditable.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetContentEditable("true")

SetContextMenu(text value)

Sets the ContextMenu attribute. Specifies a context menu that contains the element.

Parameters

  • text value: The current ContextMenu.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetContextMenu("parentmenu")

SetControls(boolean value)

This action should be set to true if the web page should display controls for playing an audio file. Setting this to false will remove contols from the page.

Parameters

  • boolean value

Example


use Libraries.Web.Page.Audio

Audio audio
audio:SetControls(true)

SetDraggable(boolean value)

Sets the Draggable attribute. Specifies wether an element is draggable or not.

Parameters

  • boolean value: The current Draggable.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetDraggable(true)

SetDropZone(text value)

Sets the DropZone attribute. This element specifies what happens when an element is dropped on a web page. The three valid values are copy, move, and link.

Parameters

  • text value: The current DropZone.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetDropZone("move")

SetHidden(boolean value)

Sets the AccessKey attribute. Specifies wether an element is hidden or not.

Parameters

  • boolean value: To true to hide element and false to make it visible.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetHidden(false)

SetIdentifier(text value)

Sets the Identifier attribute. Specifies a unique name for the element.

Parameters

  • text value: The current Identifier.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetIdentifier("myElement")

SetLanguage(text value)

Creates and sets an attribute for language. As these codes are esoteric in the standard on the web (HTML), we recommend using the LanguageCode class to help.

Parameters

  • text value

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.LanguageCode
use Libraries.Web.Page.Link

LanguageCode code
//use any WebItem, in this case a link
Link link
link:SetLanguage(code:english)

SetLoop(boolean value)

This action is set to true if the audio file played on this web page should automatically repeat itself after it is complete. Setting this to false will remove looping from the page.

Parameters

  • boolean value

Example


use Libraries.Web.Page.Audio

Audio audio
audio:SetLoop(true)

SetOnAbort(text value)

Sets the OnAbort attribute script when the OnAbort event is triggered.

Parameters

  • text value: The current OnAbort attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnAbort("doSomething()")

SetOnCanPlay(text value)

Sets the OnCanPlay attribute script when the OnCanPlay event is triggered.

Parameters

  • text value: The current OnCanPlay attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnCanPlay("doSomething()")

SetOnCanPlayThrough(text value)

Sets the OnCanPlayThrough attribute script when the OnCanPlayThrough event is triggered.

Parameters

  • text value: The current OnCanPlayThrough attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnCanPlayThrough("doSomething()")

SetOnDurationChange(text value)

Sets the OnDurationChange attribute script when the OnDurationChange event is triggered.

Parameters

  • text value: The current OnDurationChange attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnDurationChange("doSomething()")

SetOnEmptied(text value)

Sets the OnEmptied attribute script when the OnEmptied event is triggered.

Parameters

  • text value: The current OnEmptied attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnEmptied("doSomething()")

SetOnEnded(text value)

Sets the OnEnded attribute script when the OnEnded event is triggered.

Parameters

  • text value: The current OnEnded attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnEnded("doSomething()")

SetOnLoadStart(text value)

Sets the OnLoadStart attribute script when the OnLoadStart event is triggered.

Parameters

  • text value: The current OnLoadStart attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnLoadStart("doSomething()")

SetOnLoadedData(text value)

Sets the OnLoadedData attribute script when the OnLoadedData event is triggered.

Parameters

  • text value: The current OnLoadedData attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnLoadedData("doSomething()")

SetOnLoadedMetaData(text value)

Sets the OnLoadedMetaData attribute script when the OnLoadedMetaData event is triggered.

Parameters

  • text value: The current OnLoadedMetaData attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnLoadedMetaData("doSomething()")

SetOnMediaError(text value)

Sets the OnMediaError attribute script when the OnMediaError event is triggered.

Parameters

  • text value: The current OnMediaError attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnMediaError("doSomething()")

SetOnPause(text value)

Sets the OnPause attribute script when the OnPause event is triggered.

Parameters

  • text value: The current OnPause attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnPause("doSomething()")

SetOnPlay(text value)

Sets the OnPlay attribute script when the OnPlay event is triggered.

Parameters

  • text value: The current OnPlay attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnPlay("doSomething()")

SetOnPlaying(text value)

Sets the OnPlaying attribute script when the OnPlaying event is triggered.

Parameters

  • text value: The current OnPlaying attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnPlaying("doSomething()")

SetOnProgress(text value)

Sets the OnProgress attribute script when the OnProgress event is triggered.

Parameters

  • text value: The current OnProgress attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnProgress("doSomething()")

SetOnRateChange(text value)

Sets the OnRateChange attribute script when the OnRateChange event is triggered.

Parameters

  • text value: The current OnRateChange attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnRateChange("doSomething()")

SetOnReadyStateChange(text value)

Sets the OnReadyStateChange attribute script when the OnReadyStateChange event is triggered.

Parameters

  • text value: The current OnReadyStateChange attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnReadyStateChange("doSomething()")

SetOnSeeked(text value)

Sets the OnSeeked attribute script when the OnSeeked event is triggered.

Parameters

  • text value: The current OnSeeked attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnSeeked("doSomething()")

SetOnSeeking(text value)

Sets the OnSeeking attribute script when the OnSeeking event is triggered.

Parameters

  • text value: The current OnSeeking attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnSeeking("doSomething()")

SetOnStalled(text value)

Sets the OnStalled attribute script when the OnStalled event is triggered.

Parameters

  • text value: The current OnStalled attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnStalled("doSomething()")

SetOnSuspend(text value)

Sets the OnSuspend attribute script when the OnSuspend event is triggered.

Parameters

  • text value: The current OnSuspend attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnSuspend("doSomething()")

SetOnTimeUpdate(text value)

Sets the OnTimeUpdate attribute script when the OnTimeUpdate event is triggered.

Parameters

  • text value: The current OnTimeUpdate attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnTimeUpdate("doSomething()")

SetOnVolumeChange(text value)

Sets the OnVolumeChange attribute script when the OnVolumeChange event is triggered.

Parameters

  • text value: The current OnVolumeChange attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnVolumeChange("doSomething()")

SetOnWaiting(text value)

Sets the OnWaiting attribute script when the OnWaiting event is triggered.

Parameters

  • text value: The current OnWaiting attribute.

Example



use Libraries.Web.Page.MediaAttributeAccepter
use Libraries.Web.Page.Attribute

MediaAttributeAccepter accept
accept:SetOnWaiting("doSomething()")

SetPreload(text value)

This action sets information on how audio should be loaded from this tag. There are three options for passing information to this action, which are written into the constants : 1) preloadAuto, 2) preloadMetadata, and 3) preloadNone.

Auto specifies that the audio should be loaded automatically when the page loads. The Metadata tag means that the page should load information about the audio file to be played, but that the actual audio should not be loaded. The "none" tag specifies that no information about the audio should be loaded when the page loads.

Parameters

  • text value

Example


use Libraries.Web.Page.Audio

Audio audio
audio:SetPreload(audio:preloadAuto)

SetSpellcheck(boolean value)

Sets the Spellcheck attribute. Specifies wether spellcheck is on or off.

Parameters

  • boolean value: The current Spellcheck.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetSpellcheck(true)

SetStyle(text value)

Sets the Style attribute. Specifies inline css formatting for an element.

Parameters

  • text value: The current Style.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetStyle("color:orange")

SetTabIndex(text value)

Sets the TabIndex attribute. Specifies a tab order for elements.

Parameters

  • text value: The current TabIndex.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetTabIndex("0")

SetTextDirection(text value)

Sets the TextDirection attribute. Specifies a direction for the text to be written. For example, "ltr" is left-to-right.

Parameters

  • text value: The current TextDirection.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetTextDirection("rtl")

SetTitle(text value)

Sets the Title attribute. Specifies title information for the web element.

Parameters

  • text value: The current Title.

Example



use Libraries.Web.Page.GlobalAttributeAccepter
use Libraries.Web.Page.Attribute

GlobalAttributeAccepter accept
accept:SetTitle("MyTitle")

ToText()

This action generates text for a particular web page. It is a helper action for Generate()

Return

text: This returns text in hypertext markup language (HTML) representing the tag.

Example

use Libraries.Web.Page.WebPage

WebPage page
text result = page:ToText()
//output out the web page
output result