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

Summary

Variable Summary Table

VariablesDescription
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.
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.

Actions Summary Table

ActionsDescription
Add(Libraries.Web.Page.Attribute attribute)This action adds an attribute to this object.
AddAttribute(text name, text value)This action adds an attribute to this object.
AddClassAttribute(text value)Adds to the ClassAttribute attribute.
AddText(text value)This action sets the description text for this WebTag.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
Generate()
GenerateAttributes()This action returns a text description of all attributes stored.
GenerateNestedTags()This action generates the HTML output text of all of the nested WebTags.
GetAccessKey()Returns the AccessKey attribute.
GetAddress()This action returns the address where the audio file resides.
GetAttribute(text name)This action returns an attribute from this object's Attributes object.
GetAttributeValue(text name)This action returns an attribute from this object's Attributes object.
GetAttributes()Returns a list of all attributes on the system.
GetAutoPlay()This action returns true if the web page will automatically try to play the specified audio file as soon as it is ready.
GetClassAttribute()Returns the ClassAttribute attribute.
GetContentEditable()Returns the ContentEditable attribute.
GetContextMenu()Returns the ContextMenu attribute.
GetControls()This action returns true if the web page will display controls for playing an audio file.
GetDraggable()Returns the Draggable attribute.
GetDropZone()Returns the DropZone attribute.
GetHashCode()This action gets the hash code for an object.
GetHidden()Returns the Hidden attribute.
GetIdentifier()Returns the Identifier attribute.
GetIterator()This action returns an iterator of all attributes stored in this object.
GetLanguage()Returns the Language attribute.
GetLoop()This action returns true if the audio file played on this web page will automatically repeat itself after it is complete.
GetNumberOfAttributes()This action returns the number of attributes that are currently stored in this object.
GetNumberOfNestedTags()This action gets the number of nested tags within the current WebTag.
GetOnAbort()Returns the OnAbort attribute.
GetOnCanPlay()Returns the OnCanPlay attribute.
GetOnCanPlayThrough()Returns the OnCanPlayThrough attribute.
GetOnDurationChange()Returns the OnDurationChange attribute.
GetOnEmptied()Returns the OnEmptied attribute.
GetOnEnded()Returns the OnEnded attribute.
GetOnLoadStart()Returns the OnLoadStart attribute.
GetOnLoadedData()Returns the OnLoadedData attribute.
GetOnLoadedMetaData()Returns the OnLoadedMetaData attribute.
GetOnMediaError()Returns the OnMediaError attribute.
GetOnPause()Returns the OnPause attribute.
GetOnPlay()Returns the OnPlay attribute.
GetOnPlaying()Returns the OnPlaying attribute.
GetOnProgress()Returns the OnProgress attribute.
GetOnRateChange()Returns the OnRateChange attribute.
GetOnReadyStateChange()Returns the OnReadyStateChange attribute.
GetOnSeeked()Returns the OnSeeked attribute.
GetOnSeeking()Returns the OnSeeking attribute.
GetOnStalled()Returns the OnStalled attribute.
GetOnSuspend()Returns the OnSuspend attribute.
GetOnTimeUpdate()Returns the OnTimeUpdate attribute.
GetOnVolumeChange()Returns the OnVolumeChange attribute.
GetOnWaiting()Returns the OnWaiting attribute.
GetPreload()This action returns information on how audio should be loaded from this tag.
GetSpellcheck()Returns the Spellcheck attribute.
GetStyle()Returns the Style attribute.
GetTabIndex()Returns the TabIndex attribute.
GetTextDirection()Returns the TextDirection attribute.
GetTitle()Returns the Title attribute.
HasAttribute(text name)This action returns whether or not an attribute exists for the key passed in as a parameter.
Remove(Libraries.Web.Page.WebTag tag)This action removes the first instance of a webtag found in the list of sub-WebTags.
RemoveAttribute(text name)This action removes an attribute with a particular key.
SetAccessKey(text value)Sets the AccessKey attribute.
SetAddress(text value)This action sets the address where the audio file resides.
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.
SetClassAttribute(text value)Sets the ClassAttribute attribute.
SetContentEditable(text value)Sets the ContentEditable attribute.
SetContextMenu(text value)Sets the ContextMenu attribute.
SetControls(boolean value)This action should be set to true if the web page should display controls for playing an audio file.
SetDraggable(boolean value)Sets the Draggable attribute.
SetDropZone(text value)Sets the DropZone attribute.
SetHidden(boolean value)Sets the AccessKey attribute.
SetIdentifier(text value)Sets the Identifier attribute.
SetLanguage(text value)Creates and sets an attribute for language.
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.
SetOnAbort(text value)Sets the OnAbort attribute script when the OnAbort event is triggered.
SetOnCanPlay(text value)Sets the OnCanPlay attribute script when the OnCanPlay event is triggered.
SetOnCanPlayThrough(text value)Sets the OnCanPlayThrough attribute script when the OnCanPlayThrough event is triggered.
SetOnDurationChange(text value)Sets the OnDurationChange attribute script when the OnDurationChange event is triggered.
SetOnEmptied(text value)Sets the OnEmptied attribute script when the OnEmptied event is triggered.
SetOnEnded(text value)Sets the OnEnded attribute script when the OnEnded event is triggered.
SetOnLoadStart(text value)Sets the OnLoadStart attribute script when the OnLoadStart event is triggered.
SetOnLoadedData(text value)Sets the OnLoadedData attribute script when the OnLoadedData event is triggered.
SetOnLoadedMetaData(text value)Sets the OnLoadedMetaData attribute script when the OnLoadedMetaData event is triggered.
SetOnMediaError(text value)Sets the OnMediaError attribute script when the OnMediaError event is triggered.
SetOnPause(text value)Sets the OnPause attribute script when the OnPause event is triggered.
SetOnPlay(text value)Sets the OnPlay attribute script when the OnPlay event is triggered.
SetOnPlaying(text value)Sets the OnPlaying attribute script when the OnPlaying event is triggered.
SetOnProgress(text value)Sets the OnProgress attribute script when the OnProgress event is triggered.
SetOnRateChange(text value)Sets the OnRateChange attribute script when the OnRateChange event is triggered.
SetOnReadyStateChange(text value)Sets the OnReadyStateChange attribute script when the OnReadyStateChange event is triggered.
SetOnSeeked(text value)Sets the OnSeeked attribute script when the OnSeeked event is triggered.
SetOnSeeking(text value)Sets the OnSeeking attribute script when the OnSeeking event is triggered.
SetOnStalled(text value)Sets the OnStalled attribute script when the OnStalled event is triggered.
SetOnSuspend(text value)Sets the OnSuspend attribute script when the OnSuspend event is triggered.
SetOnTimeUpdate(text value)Sets the OnTimeUpdate attribute script when the OnTimeUpdate event is triggered.
SetOnVolumeChange(text value)Sets the OnVolumeChange attribute script when the OnVolumeChange event is triggered.
SetOnWaiting(text value)Sets the OnWaiting attribute script when the OnWaiting event is triggered.
SetPreload(text value)This action sets information on how audio should be loaded from this tag.
SetSpellcheck(boolean value)Sets the Spellcheck attribute.
SetStyle(text value)Sets the Style attribute.
SetTabIndex(text value)Sets the TabIndex attribute.
SetTextDirection(text value)Sets the TextDirection attribute.
SetTitle(text value)Sets the Title attribute.

Actions Documentation

Add(Libraries.Web.Page.Attribute attribute)

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

Example Code

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)

Parameters

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

Example Code

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

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

Parameters

AddClassAttribute(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:AddClassAttribute("myClass")

Parameters

AddText(text value)

This action sets the description text for this WebTag.

Example Code

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)

Parameters

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

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

Example Code

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

Parameters

Return

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

Generate()

Return

text

GenerateAttributes()

This action returns a text description of all attributes stored.

Example Code

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

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

Return

text:

GenerateNestedTags()

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

Example Code

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()

Return

text: The text including all webtags within this WebTag.

GetAccessKey()

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

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetAccessKey()

Return

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

GetAddress()

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

Example Code

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

        Audio audio
        Attribute play = audio:GetAddress()

Return

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

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.

Example Code

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")

Parameters

Return

Libraries.Web.Page.Attribute:

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.

Example Code

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")

Parameters

Return

text:

GetAttributes()

Returns a list of all attributes on the system.

Example Code

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

        AttributeAccepter accept
        Attributes attributes = accept:GetAttributes()

Return

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

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.

Example Code

use Libraries.Web.Page.Audio

        Audio audio
        boolean play = audio:GetAutoPlay()

Return

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

GetClassAttribute()

Returns the ClassAttribute attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetClassAttribute()

Return

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

GetContentEditable()

Returns the ContentEditable attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetContentEditable()

Return

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

GetContextMenu()

Returns the ContextMenu attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetContextMenu()

Return

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

GetControls()

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

Example Code

use Libraries.Web.Page.Audio

        Audio audio
        boolean play = audio:GetControls()

Return

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

GetDraggable()

Returns the Draggable attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetDraggable()

Return

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

GetDropZone()

Returns the DropZone attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetDropZone()

Return

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

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetHidden()

Returns the Hidden attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetHidden()

Return

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

GetIdentifier()

Returns the Identifier attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetIdentifier()

Return

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

GetIterator()

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

Example Code

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

Return

Libraries.Containers.Iterator:

GetLanguage()

Returns the Language attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetLanguage()

Return

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

GetLoop()

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

Example Code

use Libraries.Web.Page.Audio

        Audio audio
        boolean play = audio:GetLoop()

Return

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

GetNumberOfAttributes()

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

Example Code

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

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

Return

integer:

GetNumberOfNestedTags()

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

Example Code

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:GetNumberOfNestedTags()

Return

integer: The number of nested tags.

GetOnAbort()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnAbort()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnCanPlay()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnCanPlayThrough()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnDurationChange()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnEmptied()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnEnded()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnLoadStart()

Return

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

GetOnLoadedData()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnLoadedData()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnLoadedMetaData()

Return

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

GetOnMediaError()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnMediaError()

Return

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

GetOnPause()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnPause()

Return

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

GetOnPlay()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnPlay()

Return

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

GetOnPlaying()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnPlaying()

Return

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

GetOnProgress()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnProgress()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnRateChange()

Return

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

GetOnReadyStateChange()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnReadyStateChange()

Return

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

GetOnSeeked()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnSeeked()

Return

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

GetOnSeeking()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnSeeking()

Return

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

GetOnStalled()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnStalled()

Return

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

GetOnSuspend()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnSuspend()

Return

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

GetOnTimeUpdate()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnTimeUpdate()

Return

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

GetOnVolumeChange()

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

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnVolumeChange()

Return

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

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.

Example Code

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

        MediaAttributeAccepter accept
        Attribute attribute = accept:GetOnWaiting()

Return

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

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.

Example Code

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

        Audio audio
        Attribute play = audio:GetPreload()

Return

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

GetSpellcheck()

Returns the Spellcheck attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetSpellcheck()

Return

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

GetStyle()

Returns the Style attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetStyle()

Return

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

GetTabIndex()

Returns the TabIndex attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetTabIndex()

Return

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

GetTextDirection()

Returns the TextDirection attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetTextDirection()

Return

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

GetTitle()

Returns the Title attribute.

Example Code

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

        GlobalAttributeAccepter accept
        Attribute attribute = accept:GetTitle()

Return

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

HasAttribute(text name)

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

Example Code

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")

Parameters

Return

boolean:

Remove(Libraries.Web.Page.WebTag tag)

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

Example Code

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)

Parameters

RemoveAttribute(text name)

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

Example Code

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")

Parameters

Return

Libraries.Web.Page.Attribute:

SetAccessKey(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetAccessKey("z")

Parameters

SetAddress(text value)

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

Example Code

use Libraries.Web.Page.Audio

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

Parameters

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.

Example Code

use Libraries.Web.Page.Audio

        Audio audio
        audio:SetAutoPlay(true)

Parameters

SetClassAttribute(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetClassAttribute("myClass")

Parameters

SetContentEditable(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetContentEditable("true")

Parameters

SetContextMenu(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetContextMenu("parentmenu")

Parameters

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.

Example Code

use Libraries.Web.Page.Audio

        Audio audio
        audio:SetControls(true)

Parameters

SetDraggable(boolean value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetDraggable(true)

Parameters

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.

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetDropZone("move")

Parameters

SetHidden(boolean value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetHidden(false)

Parameters

SetIdentifier(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetIdentifier("myElement")

Parameters

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.

Example Code

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)

Parameters

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.

Example Code

use Libraries.Web.Page.Audio

        Audio audio
        audio:SetLoop(true)

Parameters

SetOnAbort(text value)

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

Example Code

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

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

Parameters

SetOnCanPlay(text value)

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

Example Code

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

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

Parameters

SetOnCanPlayThrough(text value)

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

Example Code

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

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

Parameters

SetOnDurationChange(text value)

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

Example Code

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

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

Parameters

SetOnEmptied(text value)

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

Example Code

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

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

Parameters

SetOnEnded(text value)

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

Example Code

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

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

Parameters

SetOnLoadStart(text value)

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

Example Code

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

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

Parameters

SetOnLoadedData(text value)

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

Example Code

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

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

Parameters

SetOnLoadedMetaData(text value)

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

Example Code

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

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

Parameters

SetOnMediaError(text value)

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

Example Code

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

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

Parameters

SetOnPause(text value)

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

Example Code

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

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

Parameters

SetOnPlay(text value)

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

Example Code

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

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

Parameters

SetOnPlaying(text value)

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

Example Code

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

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

Parameters

SetOnProgress(text value)

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

Example Code

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

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

Parameters

SetOnRateChange(text value)

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

Example Code

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

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

Parameters

SetOnReadyStateChange(text value)

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

Example Code

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

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

Parameters

SetOnSeeked(text value)

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

Example Code

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

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

Parameters

SetOnSeeking(text value)

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

Example Code

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

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

Parameters

SetOnStalled(text value)

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

Example Code

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

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

Parameters

SetOnSuspend(text value)

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

Example Code

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

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

Parameters

SetOnTimeUpdate(text value)

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

Example Code

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

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

Parameters

SetOnVolumeChange(text value)

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

Example Code

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

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

Parameters

SetOnWaiting(text value)

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

Example Code

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

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

Parameters

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.

Example Code

use Libraries.Web.Page.Audio

        Audio audio
        audio:SetPreload(audio:preloadAuto)

Parameters

SetSpellcheck(boolean value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetSpellcheck(true)

Parameters

SetStyle(text value)

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

Example Code

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

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

Parameters

SetTabIndex(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetTabIndex("0")

Parameters

SetTextDirection(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetTextDirection("rtl")

Parameters

SetTitle(text value)

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

Example Code

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

        GlobalAttributeAccepter accept
        accept:SetTitle("MyTitle")

Parameters