aspen-decorations
Options
All
  • Public
  • Public/Protected
  • All
Menu

The "consumer level" part of Decoration

ClasslistComposite contains composited classnames from all the decorations applicable to a target

The composite includes all the applicable inheritances and negations.

Note that due to performance considerations, ClasslistComposite is one of the few cases where we do not use Disposables for event management and instead use old school addChangeListener/removeChangeListener methods.

Remember to pass same named function reference to addChangeListener and removeChangeLiseneer while subscribing and unsusbscribing in componentDidMount and componentWillUnmount respectively.

Note: You should also implement a componentDidUpdate hook where you can unsubscribe from previous decoration object and subscribe to the new one.

Hierarchy

  • ClasslistComposite

Index

Constructors

constructor

  • new ClasslistComposite(addChangeListener: function, removeChangeListener: function): ClasslistComposite
  • internal

    Parameters

    • addChangeListener: function
        • (namedCallback: function): void
        • Parameters

          • namedCallback: function
              • (): void
              • Returns void

          Returns void

    • removeChangeListener: function
        • (namedCallback: function): void
        • Parameters

          • namedCallback: function
              • (): void
              • Returns void

          Returns void

    Returns ClasslistComposite

Properties

addChangeListener

addChangeListener: function

Registers a function to be called when composited classlist changes

âš  Remember not to use anonymous function!! (pass a named function reference instead)

Type declaration

    • (namedCallback: function): void
    • Parameters

      • namedCallback: function
          • (): void
          • Returns void

      Returns void

classlist

classlist: ReadonlyArray<string>

removeChangeListener

removeChangeListener: function

Unregisters a previsously registered classlist change listener

âš  Remember not to use anonymous function!! (pass a named function reference instead)

Type declaration

    • (namedCallback: function): void
    • Parameters

      • namedCallback: function
          • (): void
          • Returns void

      Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc