beautypg.com

Element.removetranslatedattribute(), Element.settranslatedattribute() – Adobe Dreamweaver API Reference CS5 User Manual

Page 339

background image

334

DREAMWEAVER API REFERENCE

Page content

Last updated 8/27/2013

element.removeTranslatedAttribute()

Availability
Dreamweaver CS3.

Description
This function is the same as the W3C

removeAttribute()

function, but acts on translated attributes. The

element.removeTranslatedAttribute()

function removes an attribute by name. If the attribute has a default value,

an attribute appears containing the default value and the corresponding namespace URI, local name, and prefix, if
applicable.

Arguments
name

The name argument is a DOMString that is the name of the attribute to remove.

Returns
Nothing.

element.setTranslatedAttribute()

Availability
Dreamweaver CS3.

Description
This function is the same as the W3C

setAttribute()

function, but acts on translated attributes. The

element.setTranslatedAttribute()

function adds a new attribute with the value specified. If an attribute with the

specified name already exists in the element, its value is changed to that specified in the value argument.

The value is a simple string; it is not parsed as it is being set. Therefore, any syntax included in the string is treated as
simple text, and must be appropriately escaped by the implementation when it is written out.

To assign an attribute value that contains syntax intended to be recognized as an entity reference, you must create an

Attr

node plus any

Text

and

EntityReference

nodes, build the appropriate subtree, and use

setAttributeNode

to

assign it as the value of an attribute.

Arguments
name, value

The name argument is a DOMString that is the name of the attribute to create or change.

The value argument is a DOMString that is the value to set for the attribute.

Returns
Nothing.