Package cssutils :: Package css :: Module selectorlist :: Class SelectorList
[hide private]
[frames] | no frames]

Class SelectorList

source code

object --+    
         |    
 util.Base --+
             |
object --+   |
         |   |
      list --+
             |
            SelectorList

(cssutils) a list of Selectors of a CSSStyleRule

Properties

length: of type unsigned long, readonly
The number of Selector elements in the list.
selectorText: of type DOMString
The textual representation of the selector for the rule set. The implementation may have stripped out insignificant whitespace while parsing the selector.
seq:
A list of interwoven Selector objects and u','


Nested Classes [hide private]

Inherited from util.Base (private): _prods

Instance Methods [hide private]
 
__init__(self, selectorText=None, readonly=False)
initializes SelectorList with optional selectorText
source code
 
appendSelector(self, newSelector)
append a new Selector made from newSelector returns new Selector
source code
 
_getLength(self) source code
 
_getSelectorText(self)
returns serialized format
source code
 
_setSelectorText(self, selectorText)
comma-separated list of selectors
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __hash__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __reversed__, __rmul__, __setitem__, __setslice__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Static Methods [hide private]

Inherited from util.Base (private): _normalize

Class Variables [hide private]

Inherited from util.Base (private): _SHORTHANDPROPERTIES, _log

Properties [hide private]
  length
The number of Selector elements in the list.
  selectorText
(cssutils) The textual representation of the selector for a rule set.

Inherited from object: __class__

Method Details [hide private]

__init__(self, selectorText=None, readonly=False)
(Constructor)

source code 
initializes SelectorList with optional selectorText
Returns:
new list

Overrides: list.__init__

appendSelector(self, newSelector)

source code 

append a new Selector made from newSelector returns new Selector

DOMException on setting

  • SYNTAX_ERR: (self) Raised if the specified CSS string value has a syntax error and is unparsable.
  • NO_MODIFICATION_ALLOWED_ERR: (self) Raised if this rule is readonly.

_setSelectorText(self, selectorText)

source code 
selectortext
comma-separated list of selectors

DOMException on setting

  • SYNTAX_ERR: (self) Raised if the specified CSS string value has a syntax error and is unparsable.
  • NO_MODIFICATION_ALLOWED_ERR: (self) Raised if this rule is readonly.

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: list.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

Property Details [hide private]

length

The number of Selector elements in the list.
Get Method:
cssutils.css.selectorlist.SelectorList._getLength(self)
Set Method:
None
Delete Method:
None

selectorText

(cssutils) The textual representation of the selector for a rule set.
Get Method:
cssutils.css.selectorlist.SelectorList._getSelectorText(self) - returns serialized format
Set Method:
cssutils.css.selectorlist.SelectorList._setSelectorText(self, selectorText) - comma-separated list of selectors
Delete Method:
None