Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
CSS::SAC::Selector(3) User Contributed Perl DocumentationCSS::SAC::Selector(3)

NAME
       CSS::SAC::Selector - base class for SAC selectors

SYNOPSIS
	 use CSS::SAC::Selector	qw(:constants);
	 foo if	$sel->is_type(SELECTOR_TYPE_CONSTANT);

DESCRIPTION
       SAC Selectors describe selectors	that can be expressed in CSS such as
       ElementSelector or SiblingSelector. This	class provides everything that
       is needed to implement simple selectors (methods, constants) as well as
       what is needed by subclasses defining more complex selectors.

       The constants are those defined in the SAC spec,	with the leading SAC_
       removed.	What the constants map to is to	be considered an opaque	token
       that can	be tested for equality.	If there is demand for it, I will add
       a way to	add new	constants (for people wishing to define	new condition
       types).

       I have also added the UNKNOWN_SELECTOR constant.	It shouldn't occur in
       normal processing but it's always useful	to have	such fallback values.

       The Selector interface adds $sel->is_type($selector_type) to the
       interface defined in the	SAC spec. This allows for more flexible	type
       checking. The advantages	are the	same as	those described	for the	same
       extension in the	CSS::SAC::Condition class.

CONSTANTS
       o   UNKNOWN_SELECTOR

       o   ANY_NODE_SELECTOR

       o   CDATA_SECTION_NODE_SELECTOR

       o   CHILD_SELECTOR

       o   COMMENT_NODE_SELECTOR

       o   CONDITIONAL_SELECTOR

       o   DESCENDANT_SELECTOR

       o   DIRECT_ADJACENT_SELECTOR

       o   ELEMENT_NODE_SELECTOR

       o   NEGATIVE_SELECTOR

       o   PROCESSING_INSTRUCTION_NODE_SELECTOR

       o   PSEUDO_ELEMENT_SELECTOR

       o   ROOT_NODE_SELECTOR

       o   TEXT_NODE_SELECTOR

METHODS
       o   CSS::SAC::Selector->new($type) or $sel->new($type)

	   Creates a new selector. The $type must be one of the	type
	   constants.

       o   $sel->SelectorType()	or $sel->getSelectorType

	   Returns the constant	corresponding to the type of this selector.

       o   $sel->is_type($selector_type)

	   Returns a boolean indicating	whether	this selector is of type
	   $selector_type (a selector constant).

AUTHOR
       Robin Berjon <robin@knowscape.com>

       This module is licensed under the same terms as Perl itself.

perl v5.32.0			  2001-08-17		 CSS::SAC::Selector(3)

NAME | SYNOPSIS | DESCRIPTION | CONSTANTS | METHODS | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=CSS::SAC::Selector&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help