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

Class SelectorList

source code

  object --+    
           |    
   util.Base --+
               |
  object --+   |
           |   |
util.ListSeq --+
               |
              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
 
__prepareset(self, newSelector) source code
 
__setitem__(self, index, newSelector)
overwrites ListSeq.__setitem__
source code
 
appendSelector(self, newSelector)
Append newSelector (is a string will be converted to a new Selector.
source code
 
append(self, newSelector)
overwrites ListSeq.append
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 util.ListSeq: __contains__, __delitem__, __getitem__, __iter__, __len__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __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
Overrides: util.ListSeq.__init__

__setitem__(self, index, newSelector)
(Index assignment operator)

source code 

overwrites ListSeq.__setitem__

Any duplicate Selectors are not removed.

Overrides: util.ListSeq.__setitem__

appendSelector(self, newSelector)

source code 

Append newSelector (is a string will be converted to a new Selector. A duplicate Selector is removed.

Returns new Selector or None if newSelector is no valid 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.

append(self, newSelector)

source code 
overwrites ListSeq.append
Overrides: util.ListSeq.append

_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: object.__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