Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Directive<T>

Directive definition

example
registerDirective({
 attribute: (attr: Attr) => attr.nodeName.startsWith('*autoSelect') && attr.parentElement.localName === 'input',
 process: ({targetNode} => {
   targetNode.addEventListener('focus', () => targetNode.select());
 })
})

Type parameters

  • T

Hierarchy

  • Directive

Index

Properties

Properties

attribute

attribute: string | function

Parser function or attribute exact name for detecting if an attribute should be processed as a directive

process

process: function

When attribute function returns a truthy value this function is called to process or initiate the directive actions

Type declaration

Generated using TypeDoc