Search completed in 1.15 seconds.
Microdata DOM API - Web APIs
r call. In other cases, a new NodeList object must be returned. Properties element . itemValue [ = value ] Returns the element's value. Can be set, to change the element's value. Setting the value when the element has no itemprop attribute or when the element's value is an item throws an InvalidAccessError exception. element . properties If the element has an itemscope attribute, returns an
HTMLPropertiesCollection object with all the element's properties. Otherwise, an empty
HTMLPropertiesCollection object. Code example This sample shows how the getItems() method can be used to obtain a list of all the top-level microdata items of a particular type given in the document: var cats = document.getItems("http://example.com/feline"); Once an element representing an item has been obtained, its properties can...
...sCollection object. Code example This sample shows how the getItems() method can be used to obtain a list of all the top-level microdata items of a particular type given in the document: var cats = document.getItems("http://example.com/feline"); Once an element representing an item has been obtained, its properties can be extracted using the properties IDL attribute. This attribute returns an
HTMLPropertiesCollection, which can be enumerated to go through each element that adds one or more properties to the item. It can also be indexed by name, which will return an object with a list of the elements that add properties with that name. Each element that adds a property also has an itemValue IDL attribute that returns its value. Code example This sample gets the first item of type "http://example.net/user" a...
... properties with that name. Each element that adds a property also has an itemValue IDL attribute that returns its value. Code example This sample gets the first item of type "http://example.net/user" and then pops up an alert using the "name" property from that item. var user = document.getItems('http://example.net/user')[0]; alert('Hello ' + user.properties['name'][0].itemValue + '!'); The
HTMLPropertiesCollection object, when indexed by name in this way, actually returns a PropertyNodeList object with all the matching properties. The PropertyNodeList object can be used to obtain all the values at once usingits getValues method, which returns an array of all the values. Code example In an earlier example, a "http://example.org/animals#cat" item had two "http://example.com/color" values. This script looks...
...And 4 more matches
HTMLElement - Web APIs
d only Returns a Element that is the element from which all offset calculations are currently computed. HTMLElement.offsetTop Read only Returns a double, the distance from this element's top border to its offsetParent's top border. HTMLElement.offsetWidth Read only Returns a double containing the width of an element, relative to the layout. HTMLElement.properties Read only Returns a
HTMLPropertiesCollection... HTMLElement.spellcheck Is a Boolean that controls spell-checking. It is present on all HTML elements, though it doesn't have an effect on all of them. HTMLElement.style Is a CSSStyleDeclaration, an object representing the declarations of an element's style attributes. HTMLOrForeignElement.tabIndex Is a long representing the position of the element in the tabbing order. HTMLElement.title...