new ImageElement(dom_element)
Creates image element object representing information related to an image or area element on a web page
Parameters:
Name | Type | Description |
---|---|---|
dom_element |
DOMelement | The dom element object representing the image or area element |
- Source:
- scripts/cache_images.js, line 267
Properties:
Name | Type | Description |
---|---|---|
dom_element |
DOMElement | Reference to the dom element representing the image or area element |
cache_id |
String | String that uniquely identifies the cache element object in the cache |
document_order |
Number | Ordinal position of the image or area element in the document in relationship to other image or area elements |
is_image |
Boolean | True if the role of the image is an image, otherwise false (i.e. through use of role attribute) |
is_presemtation |
Boolean | True if the role of the image has been changed to presentation, otherwise false |
source |
String | The url in the src property of an image element or href property of an area element |
src_is_a_file_name |
Boolean | The filename is an image file and not a data base or other programatic reference |
file_name |
String | The filename of the image |
longdesc |
String | The url in the longdesc property of an image element |
has_longdesc |
Boolean | Does the image have a longdesc attribute |
longdesc_is_broken |
Number | Constant representing if the url is broken or untested |
longdesc_url |
String | The full URL of the longdesc attribute |
alt |
String | Calculated accessible name of the link |
alt_for_comparison |
String | Accessible name for comparison (i.e. lowercase, trimmed and space normalized) |
alt_length |
Number | Number of images that are descendents of the link |
height |
Number | Height of the image in pixels |
width |
Number | Width of the image in pixels |
Methods
-
<static> getAltTextNLS() → {String|Object}
-
Returns an object with an NLS localized string and style properties If alt attribute is empty a empty alt text message will the returned
- Source:
- scripts/cache_images.js, line 509
Returns:
Returns a String if the alt attribute has content, but if label is empty it returns an object with a 'label and 'style' property- Type
- String | Object
-
<static> getAttributes(unsorted) → {Array}
-
Returns an array of attributes for the element, sorted in alphabetical order
Parameters:
Name Type Description unsorted
Boolean If defined and true the results will NOT be sorted alphabetically - Source:
- scripts/cache_images.js, line 409
Returns:
Returns a array of attribute display object- Type
- Array
-
<static> getCacheProperties(unsorted) → {Array}
-
Returns an array of cache properties sorted by property name
Parameters:
Name Type Description unsorted
Boolean If defined and true the results will NOT be sorted alphabetically - Source:
- scripts/cache_images.js, line 437
Returns:
Returns a array of cache property display object- Type
- Array
-
<static> getCachePropertyValue(property) → {String|Number}
-
Returns the value of a property
Parameters:
Name Type Description property
String The property to retreive the value - Source:
- scripts/cache_images.js, line 468
Returns:
Returns the value of the property- Type
- String | Number
-
<static> getEvents() → {Array}
-
Returns an array of events for the element, sorted in alphabetical order
- Source:
- scripts/cache_images.js, line 491
Returns:
Returns a array of event item display objects- Type
- Array
-
<static> getNodeResults() → {Array}
-
Returns an array of node results in severity order
- Source:
- scripts/cache_images.js, line 379
Returns:
Returns a array of node results- Type
- Array
-
<static> getStyle() → {Array}
-
Returns an array of style items
- Source:
- scripts/cache_images.js, line 393
Returns:
Returns a array of style display objects- Type
- Array
-
<static> toString() → {String}
-
Creates a text string representation of the image element object
- Source:
- scripts/cache_images.js, line 542
Returns:
Returns a text string representation of the image element object- Type
- String