Home Reference Source
import {SelectorFragmentList} from 'potassium-es/src/style/Selector.js'
public class | source

SelectorFragmentList

SelectorFragmentList is a list of SelectorElements and Combinators (which both extend SelectorFragment) Example strings that represent a selector fragment list:

Single selector elements:

  • .class
  • #id
  • tag

Multiple selector elements:

  • tag .class .another-class

Multiple elements with explicit combinators

  • tag > .class:active + .another-class

Static Method Summary

Static Public Methods
public static

Parse(rawSelector: *): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

raw: *

public get

specificity: float: *

Method Summary

Public Methods
public
public

matches(node: THREE.Object3D, fragmentIndex: int, previouslyMatchedNode: THREE.Object3D): bool

Go through the list of selectors and combinators and check whether this node matches

Static Public Methods

public static Parse(rawSelector: *): * source

Params:

NameTypeAttributeDescription
rawSelector *

Return:

*

Public Constructors

public constructor() source

Public Members

public get raw: * source

Public Methods

public * [Symbol.iterator]() source

public matches(node: THREE.Object3D, fragmentIndex: int, previouslyMatchedNode: THREE.Object3D): bool source

Go through the list of selectors and combinators and check whether this node matches

Params:

NameTypeAttributeDescription
node THREE.Object3D
fragmentIndex int
  • optional
  • default: 0

the index in the reversed list of fragments at which to start

previouslyMatchedNode THREE.Object3D
  • optional
  • default: null

Return:

bool

true if the node is matched