A DOM application can use the hasFeature method of the
DOMImplementation
interface to determine whether the SMIL Object Model interfaces are
supported or not. The feature string for the fundamental interfaces listed
in this section is "SMIL". The version number of this feature for SMIL
Boston is "2.0".
The purpose of the SMIL Boston DOM is to provide an easy access to the attributes and functionalities of the SMIL Boston specification ([SMIL Boston]). Not all SMIL Boston attributes are accessible with the following API but the user can still use the DOM Core ([DOM Level 2]) to access them (see setAttributeNS and getAttributeNS).
A SMIL document is the root of the SMIL Hierarchy and holds the entire content. Beside providing access to the hierarchy, it also provides some convenience methods for accessing certain sets of information from the document.
interface SMILDocument : Document {
};
The SMILElement interface is the base for all SMIL element
types. It follows the model of the HTMLElement
in the HTML DOM, extending the base Element
class to denote SMIL-specific elements.
Note that the SMILElement interface overlaps with the
HTMLElement
interface. In practice, an integrated document profile that include HTML
and SMIL modules will effectively implement both interfaces (see also the
DOM documentation discussion of
Inheritance vs
Flattened Views of the API).
interface SMILElement : Element {
attribute DOMString id;
// raises(DOMException) on setting
};
id of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
@@TODO.
interface SMILMetaElement : SMILElement {
attribute DOMString content;
// raises(DOMException) on setting
attribute DOMString name;
// raises(DOMException) on setting
attribute DOMString skipContent;
// raises(DOMException) on setting
};
content of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
name of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
skipContent of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This module includes the layout, root_layout and region elements, and associated attributes.
Declares layout type for the document. See the LAYOUT element definition in SMIL 1.0.
interface SMILLayoutElement : SMILElement {
attribute DOMString type;
// raises(DOMException) on setting
};
type of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
Declares layout properties for the root element. See the root-layout element definition in SMIL 1.0.
interface SMILRootLayoutElement : SMILElement {
attribute DOMString title;
// raises(DOMException) on setting
attribute DOMString skipContent;
// raises(DOMException) on setting
attribute DOMString backgroundColor;
// raises(DOMException) on setting
attribute long height;
// raises(DOMException) on setting
attribute long width;
// raises(DOMException) on setting
};
title of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
skipContent of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
backgroundColor of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
height of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
width of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
Controls the position, size and scaling of media object elements. See the region element definition in SMIL 1.0.
interface SMILRegionElement : SMILElement {
attribute DOMString title;
// raises(DOMException) on setting
attribute DOMString skipContent;
// raises(DOMException) on setting
attribute DOMString fit;
// raises(DOMException) on setting
attribute DOMString backgroundColor;
// raises(DOMException) on setting
attribute long height;
// raises(DOMException) on setting
attribute long width;
// raises(DOMException) on setting
attribute DOMString top;
// raises(DOMException) on setting
attribute long zIndex;
// raises(DOMException) on setting
};
title of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
skipContent of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
fit of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
backgroundColor of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
height of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
width of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
top of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
zIndex of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
The layout module also includes the region attribute, used in SMIL layout to associate layout with content elements. This is represented as an individual interface, that is supported by content elements in SMIL documents (i.e. in profiles that use SMIL layout).
Declares rendering surface for an element. See the region attribute definition in SMIL 1.0.
interface SMILRegionInterface {
attribute SMILRegionElement region;
};
region of type SMILRegionElement
This module includes extensions for timing and synchronization.
The Time interface is a datatype that represents times
within the timegraph. A Time has a type, key values to
describe the time, and a boolean to indicate whether the values are
currently unresolved. Note that if the boolean value "resolved" is
false, then the time must be considered to be "indefinite"
(although the other values are still set to describe the
Time).
interface Time {
readonly attribute boolean resolved;
readonly attribute double resolvedOffset;
// TimeTypes
const unsigned short SMIL_TIME_INDEFINITE = 0;
const unsigned short SMIL_TIME_OFFSET = 1;
const unsigned short SMIL_TIME_SYNC_BASED = 2;
const unsigned short SMIL_TIME_EVENT_BASED = 3;
const unsigned short SMIL_TIME_WALLCLOCK = 4;
const unsigned short SMIL_TIME_MEDIA_MARKER = 5;
readonly attribute unsigned short timeType;
attribute double offset;
// raises(DOMException) on setting
attribute Element baseElement;
// raises(DOMException) on setting
attribute boolean baseBegin;
// raises(DOMException) on setting
attribute DOMString event;
// raises(DOMException) on setting
attribute DOMString marker;
// raises(DOMException) on setting
};
resolved of type boolean, readonlyTime has been
fully resolved to the document schedule. Note that for this to be
true, the current Time must be defined (not indefinite),
the syncbase and all Time's that the syncbase depends on
must be defined (not indefinite), and the begin Time of
all ascendent time containers of this element and all Time
elements that this depends upon must be defined (not indefinite).
Time is based upon an event, this
Time will only be resolved once the specified event has
happened, subject to the constraints of the time container.
resolvedOffset of type double, readonly
An integer indicating the type of this time value.
| SMIL_TIME_INDEFINITE |
The Time is specified to be "indefinite". The
Time may have a resolved value, if a method call is made
to activate this time (beginElement for a begin time, or endElement
for an active end time). If the Time is resolved, the
resolvedOffset will reflect the time at which the method call was
made.
The Time attributes offset, baseBegin, event and marker
are undefined for this type.
|
| SMIL_TIME_OFFSET |
The value is a simple offset from the default syncbase. The
baseElement will be the default syncbase element defined by the time
model, the baseBegin indicates whether the default syncbase is
relative to the begin or active end of the baseElement, and the
offset will be the specified offset.
The Time attributes baseElement, baseBegin, event and
marker are undefined for this type.
|
| SMIL_TIME_SYNC_BASED |
The value is relative to the begin of the specified baseElement. The
baseElement will be the specified syncbase, the baseBegin indicates
whether the default syncbase is relative to the begin or active end
of the baseElement, and the offset will be the specified offset.
Note that this includes times specified with the logical syncbases
"prev.begin" or "prev.end".
The Time attributes event and marker are undefined for this type.
|
| SMIL_TIME_EVENT_BASED |
The value is relative to the specified event raised on the
baseElement. The baseElement will be the specified syncbase, and the
offset will be the specified offset. If the Time is
resolved, the resolvedOffset will reflect the time at which the event
was raised.
The Time attributes baseBegin and marker are undefined
for this type.
|
| SMIL_TIME_WALLCLOCK |
The value is specified as a wallclock value. If the
Time is resolved, the resolvedOffset will reflect the
wallclock time, converted to document time.
The Time attributes baseElement, baseBegin, event and marker are undefined for this type.
|
| SMIL_TIME_MEDIA_MARKER |
The value is specified as a marker value associated with a given
media element. The baseElement will be the specified media element,
and the marker will be the name of the media marker value. If the
Time is resolved, the resolvedOffset will reflect the
time associated with the specified marker value.
The Time attributes offset, baseElement and event are
undefined for this type.
|
timeType of type unsigned short, readonly
offset of type double0.
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
baseElement of type Element
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
baseBegin of type booleantrue, indicates that a sync-based time is relative to
the begin of the baseElement. If false, indicates that a
sync-based time is relative to the active end of the baseElement.
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
event of type DOMStringnull.
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
marker of type DOMStringnull.
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
The TimeList interface provides the abstraction of an
ordered collection of times, without defining or
constraining how this collection is implemented.
The items in the TimeList are accessible via an
integral index, starting from 0.
interface TimeList {
Time item(in unsigned long index);
readonly attribute unsigned long length;
};
length of type unsigned long, readonlylength-1 inclusive.
itemindexth item in the collection.
If index is greater than or equal to the number
of times in the list, this returns null.
|
| Index into the collection. |
|
The time at the |
This interface defines the set of timing attributes that are common to all timed elements.
interface ElementTime {
attribute TimeList begin;
// raises(DOMException) on setting
attribute TimeList end;
// raises(DOMException) on setting
attribute float dur;
// raises(DOMException) on setting
attribute float repeatCount;
// raises(DOMException) on setting
attribute long repeatDur;
// raises(DOMException) on setting
boolean beginElement();
boolean endElement();
void pauseElement();
void resumeElement();
void seekElement(inout DOMString seekTo);
};
begin of type TimeList
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
end of type TimeList
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
dur of type float
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
repeatCount of type float
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
repeatDur of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
beginElement
|
|
endElement
|
|
pauseElementresumeElementseekElement
|
| The desired position on the local timeline. |
Events:
resumeElement method is invoked, and only if the
element was actually paused.
This interface support use-cases commonly associated with animation.
interface ElementTimeManipulation {
attribute float speed;
// raises(DOMException) on setting
attribute float accelerate;
// raises(DOMException) on setting
attribute float decelerate;
// raises(DOMException) on setting
attribute boolean autoReverse;
// raises(DOMException) on setting
};
speed of type float1.0 (no modification of speed).
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
accelerate of type float0 to
100. Default value is 0 (no acceleration).
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
decelerate of type float0 to
100. Default value is 0 (no deceleration).
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
autoReverse of type booleanfalse.
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
The synchronization behavior extension.
interface ElementTimeSynchronization {
readonly attribute DOMString syncBehavior;
readonly attribute float syncTolerance;
readonly attribute DOMString defaultSyncBehavior;
readonly attribute float defaultSyncTolerance;
readonly attribute boolean syncMaster;
};
syncBehavior of type DOMString, readonly
syncTolerance of type float, readonlysyncBehavior="locked".
defaultSyncBehavior of type DOMString, readonly
defaultSyncTolerance of type float, readonly
syncMaster of type boolean, readonly
This is a placeholder - subject to change. This represents generic timelines.
interface ElementTimeContainer : ElementTime {
readonly attribute NodeList timeChildrens;
NodeList getActiveChildrenAt(inout DOMString instant);
};
timeChildrens of type NodeList, readonlyNodelist is empty.
Note: An iterator is more appropriate here than a node list but it requires Traversal module support.
getActiveChildrenAt
|
| The desired position on the local timeline. |
|
List of timed child-elements active at instant. |
A parallel container defines a simple parallel time grouping
in which multiple elements can play back at the same time.
interface ElementParallelTimeContainer : ElementTimeContainer {
attribute DOMString endSync;
// raises(DOMException) on setting
};
endSync of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
A seq container defines a sequence of elements in which
elements play one after the other.
interface ElementSequentialTimeContainer : ElementTimeContainer {
};
This interface defines a time container with semantics based upon par, but with the additional constraint that only one child element may play at a time.
interface ElementExclusiveTimeContainer : ElementTimeContainer {
attribute DOMString endSync;
// raises(DOMException) on setting
};
endSync of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This module includes the media elements, and associated attributes. They are all currently represented by a single interface, as there are no specific attributes for individual media elements.
Declares media content.
interface SMILMediaElement : ElementTime, SMILElement {
attribute DOMString abstractAttr;
// raises(DOMException) on setting
attribute DOMString alt;
// raises(DOMException) on setting
attribute DOMString author;
// raises(DOMException) on setting
attribute DOMString clipBegin;
// raises(DOMException) on setting
attribute DOMString clipEnd;
// raises(DOMException) on setting
attribute DOMString copyright;
// raises(DOMException) on setting
attribute DOMString longdesc;
// raises(DOMException) on setting
attribute DOMString src;
// raises(DOMException) on setting
attribute DOMString title;
// raises(DOMException) on setting
attribute DOMString type;
// raises(DOMException) on setting
};
abstractAttr of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
alt of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
author of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
clipBegin of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
clipEnd of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
copyright of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
longdesc of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
src of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
title of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
type of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
interface SMILRefElement : SMILMediaElement {
};
This module will include interfaces associated with animations extensions.
The following interface comes from the SMIL Animation draft.
interface ElementTimeControl {
boolean beginElement()
raises(DOMException);
boolean endElement()
raises(DOMException);
};
beginElement
|
|
|
SYNTAX_ERR: The element was not defined with the appropriate
syntax to allow |
endElement
|
|
|
SYNTAX_ERR: The element was not defined with the appropriate
syntax to allow |
This interface define the set of animation extensions.
interface ElementAnimation : ElementTime, ElementTimeControl {
attribute Element targetElement;
// raises(DOMException) on setting
attribute DOMString href;
// raises(DOMException) on setting
};
targetElement of type Elementhref and targetElement are specified in the
animation document, the default value of this attribute is the first
element ancestor. If a href is not null,
setting this attribute has no effect.
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
href of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This interface represents the SMIL animate element, the SMIL
animateColor element and the SMIL animateMotion
element.
interface SMILAnimateElement : ElementAnimation, SMILElement {
attribute TimeList keyTimes;
// raises(DOMException) on setting
attribute TimeList keySplines;
// raises(DOMException) on setting
};
keyTimes of type TimeList
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
keySplines of type TimeList
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This interface represents the set element.
interface SMILSetElement : ElementAnimation, SMILElement {
};
This interface present the animationMotion element in
SMIL.
interface SMILAnimateMotionElement : SMILAnimateElement {
attribute DOMString path;
// raises(DOMException) on setting
attribute DOMString origin;
// raises(DOMException) on setting
};
path of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
origin of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This module will include interfaces associated with transition markup. This is yet to be defined.
This module includes interfaces for content control markup.
Defines a block of content control. See the switch element definition in SMIL 1.0.
interface SMILSwitchElement : SMILElement {
attribute DOMString title;
// raises(DOMException) on setting
};
title of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
Defines the test attributes interface. See the Test attributes definition in SMIL 1.0.
interface ElementTest {
attribute DOMString systemBitrate;
// raises(DOMException) on setting
attribute DOMString systemCaptions;
// raises(DOMException) on setting
attribute DOMString systemLanguage;
// raises(DOMException) on setting
attribute DOMString systemOverdubOrCaption;
// raises(DOMException) on setting
attribute DOMString systemRequired;
// raises(DOMException) on setting
attribute DOMString systemScreenSize;
// raises(DOMException) on setting
attribute DOMString systemScreenDepth;
// raises(DOMException) on setting
};
systemBitrate of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemCaptions of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemLanguage of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemOverdubOrCaption of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemRequired of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemScreenSize of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemScreenDepth of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |