12 Reference: Custom Audit Rule Listener Types

Use this reference to learn about the listener types that you can register in custom audit rules. The available listener types are specific to the file types of the Oracle JET application.

Listener Types Description

Listener Types for HTML and JSON Rules

The Oracle JAF audit engine supports a long list of listener types specific to HTML and JSON files.

Listener Types for CSS Rules

The Oracle JAF audit engine supports listener types specific to CSS source files.

Listener Types for JavaScript/TypeScript Rules

The Oracle JAF audit engine supports listener types specific to JavaScript source files.

Listener Types for Markdown Rules

The Oracle JAF audit engine supports listener types specific to Markdown source files.

Listener Types for TSX Rules

The Oracle JAF audit engine supports listener types specific to renderable JSX content in TSX source files.

Listener Types for HTML and JSON Rules

The Oracle JAF audit engine supports a long list of listener types specific to HTML and JSON files.

The following table describes the listener event types for the various data nodes that JAF may encounter when parsing the contents of HTML and JSON files and generating an abstract syntax tree (AST) for the parsed files. You implement audit rules for the HTML and JSON files of your application by registering an event listener on the desired node. The table also list the expected arguments that you supply in the registered listener and the context properties that your listener can access on the event for a particular node.

Listener Type Listener Arguments Description, Including Available Context Properties

webcomp

(Object context, string elementName)

Called for any DOM element recognized as a web component.

Your webcomp event listener can access the following context properties.
  • context.type—a string tag.
  • context.tag—a string that is the element name
  • context.ojTag—a boolean: true if element is an Oracle JET Web Component.
  • context.tagNode—an object that is the current node in the Abstract Syntax Tree (AST).
  • context.node—an object that is the current node in the AST.
  • context.position—an object whose members row and col represent the position of the tag. Members startIndex and endIndex represent the displacements into the file.
  • context.rawData—a string that is the data from the resource (either a file or a URL). This is not used for zip file data.
  • context.data—a string that is the data being audited. This is typically the same as rawData, but can be different in the case of an HTML file in a zip. The HTML data can be found in rawData, but if the HTML contains embedded JavaScript or CSS, and that data is being audited, then data will contain the JavaScript or CSS data.
  • context.suppData—an object that is Null, except in the case of an audit involving an Oracle Component Exchange zip file. If the zip contains a component.json file, then suppData an object that contains supplementary information about the component.json. This property will be present for all other files processed in the zip, and allows the files to be evaluated in the context of the component.json. The object contains the following properties:
    • suppData.obj—an object that contains the parsed JSON, or Null if the parse failed.
    • suppData.msg—an error message if the parse failed, else Null.
  • context.elemStack—an array of parent element names to the current element. The final entry (the one with the highest index) is the current element name. For example, ["html", "body", "div", oj-button"].

jetcomp

(Object context, string elementName)

Called for any JET web component.

Your jetcomp event listener can access the following context properties.
  • context.type—a string jetcomp.
  • context.ojTag—a boolean: true if element is an Oracle JET Web Component.
  • context.ojNs—a boolean: true.

For all other context contents, refer to the previous webcomp entry.

extcomp

(Object context, string elementName)

Called for any external (not-JET) web component.

Your extcomp event listener can access the following context properties.
  • context.type—a string extcomp.
  • context.ojTag—a boolean: false.
  • context.ojNs—a boolean: true, if the element name is defined in the OJ namespace.

For all other context contents, refer to the previous webcomp entry.

elem

(Object context, string elementName)

Called for any DOM element.

Your elem event listener can access the following context properties.
  • context.type—a string elem.
  • context.ojTag—a boolean: true if element is an Oracle JET Web Component.
  • context.ojNS—a boolean: true if element name is defined in the OJ namespace.

globtag

(Object context, string elementName)

Called for any global/common DOM element (including standard HTML5 element names).

Your globtag event listener can access the following context properties.
  • context.type—a string tag.
  • context.ojTag—a boolean: false.
  • context.ojNS—a boolean: false.

notglob

(Object context, string elementName)

Called for any element that is not a common HTML name nor an SVG tag name.

Your notglob event listener can access the following context properties.
  • context.type—a string notglob.
  • context.ojTag—a boolean: true if element is a JET component.
  • context.ojNS—a boolean: true if tag uses a registered namespace, else false.

tag

(Object context, string elementName)

Called for any element name NOT starting with oj-.

Your tag event listener can access the following properties.
  • context.type—a string tag.
  • context.ojTag—a boolean: false.
  • context.ojNS—a boolean: false.

bindingtag

(Object context, string elementName)

Called for a JET binding tag such as oj-bind-if or oj-bind-for-each.

Your bindingtag event listener can access the following properties.
  • context.type—a string bindingtag.
  • context.ojTag—a boolean: false.
  • context.ojNS—a boolean: true if element name is defined in the OJ namespace.

ojtag

(Object context, string elementName)

Called for any element name starting with oj-.

Your ojtag event listener can access the following properties.
  • context.type—a string ojtag.
  • context.ojTag—a boolean: false.
  • context.ojNS—a boolean: true if element name is defined in the OJ namespace.

<component>

(Object context, string elementName)

Called for any non-global HTML element with the name declared between angle brackets (e.g., <oj-messages>). A regular expression may be used (e.g., <^oj-combobox> to match all elements starting with "oj-combobox"), and whitespace is permitted on either side of the component name.

Your <component> event listener can access the following properties.
  • context.type—a string <component>.
  • context.ojTag—a boolean: false.
  • context.ojNS—a boolean: true if element name is defined in the OJ namespace.

<component attrname=>

(Object context, string attribName, string attribValue, string rawAttribValue)

Called for the specified attribute if found on the component element (e.g., <oj-messages display-options.category=>).

Whitespace is permitted on either side of the component name and before the ending chevron. The component declaration may not be a regular expression.

Your <component attrname=> event listener can access the following properties.
  • context.type—a string <component|attrname>.

Note:

See the note in the <attrname=> entry for additional information regarding the class and style attributes.

<attrname=>

(Object context, string attribName, string attribValue, string rawAttribValue)

Called for the specified attribute found on any component element (e.g., <display-options.category=>).

This is a special case of the component/attribute combination listed above, with the component omitted. Whitespace is permitted on either side of the attribute declaration.

Your <attrname=> event listener can access the following properties.
  • context.type—a string <attrname=>.

Note:

This syntax should not be used for style or class attributes. These special cases are handled by their own registered types of style and class respectively. See the subsequent entries in this table.

script

(Object context, string elementName)

Called for <script> elements. Note that rules with registered type tag are also called.

link

(Object context, string elementName)

Called for <link> elements. Note that rules with registered type tag are also called.

attr

(Object context, string attribName, string attribValue, string rawAttribValue)

Called for each attribute of an element (excluding Oracle JET event, type and class attributes).

The rawAttrValue attribute value contains the complete text including the string delimiting quotes.

Your attr event listener can access the following property.
  • context.type—a string attr.

attrexpr

(Object context, string attribName, string attribValue, string rawAttribValue)

Called for each attribute of an element if the attribute value represents a [[. . .]] or {{. . .}} expression.

attrexpr-$props

(Object context, string attribName, string attribValue, string rawAttribValue)

Called for each attribute whose value represents a [[. . .]] or {{. . .}} expression and contains at least one reference to $properties.

class

(Object context, string elemName, string classValue)

Called for each class attribute of an element.

Your class event listener can access the following property.
  • context.type—a string class.

style

(Object context, string attribName, string[] attribValue, string rawAttribValue)

Called for each style attribute of an element.

The attrValue is an array of styles extracted from the style attribute. rawAttrValue is the attribute string.

Your style event listener can access the following property.
  • context.type—a string style.

type

(Object context, string elemName, string typeValue)

Called for each type attribute of an element.

Your type event listener can access the following property.
  • context.type—a string type.

event

(Object context, string eventName, Object eventValue)

Called for each Oracle JET event attribute (starting with on-oj-).

The eventValue attribute is an object with the following properties:

  • val—a string that is the event attribute value.
  • rawval—a string that is the full event attribute value, including containing quotes (as specified).
Your event event listener can access the following property.
  • context.type—a string event.

comment

(Object context, string comment)

Called for HTML comments of the form <!-- -->.

For example, for the comment <!-- This is a comment -->, the comment argument will contain the string This is a comment.

doctype

(Object context, string comment, string value)

Called for directives of the form <!DOCTYPE ...>.

For example, for the comment <!DOCTYPE html>, the doctype argument will contain the full data, including the string !DOCTYPE html and value argument will contain the rest of the statement, the string html.

procstmt

(Object context, string procinstr, string value)

Called for processing instructions of type <? x..........x?>.

For example, the procinstr argument might be the string ?robots index="yes" follow="no"? and the valueargument will contain the rest of the statement, in this case, the string index="yes" follow="no".

directive

(Object context, string directive, string value)

Called for processing instructions of the form <!xxxx> that are not DOCTYPE instructions.

For example, for the directive <!ABCD xxxx>, the directive argument will contain the full data, including the string !ABCD xxxx and the value argument will contain the rest of the statement, the string xxxx.

json

(Object context)

Called for a file of type json.

Your json event listener can access the following properties.
  • context.type—a string json.
  • context.suppData—an object with the following members.
    • suppData.obj—the parsed JSON object, or Null if the parse failed.
    • suppData.ast—the Abstract Syntax Tree (AST) for the JSON file, or Null if the parse failed.
    • suppData.msg—an error message if the parse failed, else Null.

compjson

(Object context)

Called for a file of type json.

Your compjson event listener can access the following properties.
  • context.type—a string json.
  • context.suppData—an object with the following members.
    • suppData.obj—the parsed JSON object, or Null if the parse failed.
    • suppData.ast—the Abstract Syntax Tree (AST) for the JSON file, or Null if the parse failed.
    • suppData.msg—an error message if the parse failed, else Null.

file

(Object context)

Called after reading a file, and prior to any standard rules (node rules, not hook rules) being fired on the file.

Your file event listener can access the following properties.
  • context.phase—a string file.
  • context.rawData—a string that is the file contents.
  • context.data—a string that is the data being audited. This is typically the same as rawData, but can be different in the case of an HTML file in a zip. The HTML data can be found in rawData, but if the HTML contains embedded JavaScript or CSS, and that data is being audited, then data will contain the JavaScript or CSS data.
  • context.suppData—a string that with supplementary file data.
  • context.zipContent—an array of file names in the component zip, or an error string if there was an error during expansion of the zip. For file type .zip only.

endfile

(Object context)

Called after all standard rules (node rules, not hook rules) have been fired on the file.

Your endfile event listener can access the following properties.
  • context.phase—a string file.
  • context.rawData—a string that is the file contents.
  • context.data—a string that is the data being audited. This is typically the same as rawData, but can be different in the case of an HTML file in a zip. The HTML data can be found in rawData, but if the HTML contains embedded JavaScript or CSS, and that data is being audited, then data will contain the JavaScript or CSS data.
  • context.suppData—a string that with supplementary file data.
  • context.zipContent—an array of file names in the component zip, or an error string if there was an error during expansion of the zip. For file type .zip only.

Listener Types for CSS Rules

The Oracle JAF audit engine supports listener types specific to CSS source files.

The following table describes the listener event types for the various data nodes that JAF may encounter when parsing the contents of CSS files and generating an abstract syntax tree (AST) for the parsed files. You implement audit rules for the CSS files of your application by registering an event listener on the desired CSS node. The table also list the expected arguments that you supply in the registered listener.

Listener Type Listener Arguments Description

css-sheet

(Object context, node sheet)

Called for a stylesheet. sheet is a node from the AST representing all the Rule nodes in the sheet. The complete AST can be found in context.ast.

css-rule (Object context, Object rule)

Called for a CSS rule declaration. rule is a node from the AST.

A rule node contains the following properties and sub-properties: SelectorList, Selector, Block. The complete AST can be found in context.ast.

css-atrule (Object context, Object rule, string identifier)

Called for any CSS @rule statement. For example, @keyframes.

rule is a node from the AST.

identifier is the rule identifier. For example, for @keyframes, the identifier will be keyframes.

A rule node contains the following properties and sub-properties: SelectorList, Selector, Block. The complete AST can be found in context.ast.

css-@xxxx (Object context, Object rule, string identifier)

Called for a CSS statement of the name xxxx. For example, for @media, the type is css-@media.

rule is a node from the AST.

identifier is the rule identifier. For example, for @media, the identifier will be media.

A rule node contains the following properties and sub-properties: SelectorList, Selector, Block. The complete AST can be found in context.ast.

css-selector

(Object context, node selector)

Called for a selector of some type. Refer to node.type for the actual selector type.

css-sel-type

(Object context, node selector)

Called for a type selector.

css-sel-id

(Object context, node selector)

Called for an ID selector.

css-sel-class

(Object context, node selector)

Called for a class selector.

css-sel-pseudo

(Object context, node selector)

Called for a pseudo selector.

css-var

(Object context, node var, Object rule )

Called for a CSS variable declaration. var is the variable declaration node in the AST and contains all information about the variable. Two of the prominent members of var are:

  • var.property is of type String and references the CSS variable's name.
  • var.value is of type Object and references the CSS variable's value. The parsed value details can be found in the elements of array var.value.children

Argument rule is the Rule object that contains the variable declaration.

Listener Types for Markdown Rules

The Oracle JAF audit engine supports listener types specific to Markdown source files.

The following table describes the listener event types for the data nodes that JAF may encounter when parsing the contents of Markdown files and generating an abstract syntax tree (AST) for the parsed files. You implement audit rules for the Markdown files of your application by registering an event listener on the desired Markdown node. The table also lists the expected arguments that you supply in the registered listener.

For descriptions of the format of returned objects and their properties, see Context Object Properties Available to Markdown Rule Listeners.

Listener Type Listener Arguments Description

md-link

(Object context, Object link)

Invoked for direct or indirect link references. For example,

[Click Here](https://some/link/foo.html)

It is also invoked for URLs found in paragraph text without markup.

The link object has the following properties:

  • inline: a boolean, default true, which indicates a complete link including a URL
  • link: the URL string
  • text: a string containing the link text:
    • line: line number to reference key, relative to 1
    • col: column number to reference key, relative to 1
    • start: index number to start of reference key
    • end: index number to end of reference key

If the link declaration uses a reference link, the link object will have the property inline declared to be false, and the refKey property will replace the link property.

md-ref (Object context, Object ref)

Invoked for indirect link references. For example,

[some ref]: <the url>

The ref object has the following properties:

  • refKey: a string with the reference key (e.g., some ref)
  • link: a string containing the link with URL (e.g., www.github.com)
  • pos: an object containing location information, with the following properties:
    • line: line number to reference key, relative to 1
    • col: column number to reference key, relative to 1
    • start: index number to start of reference key
    • end: index number to end of reference key
md-para (Object context, Object para)

Invoked for paragraph text, and headings using #.

The para object has the following properties:

  • text: a string with paragraph or heading text
  • level: the number of the heading level
  • pos: an object containing two objects that hold the paragraph/heading start and end location info, respectively, in the following format:
    • line: starting line number, relative to 1
    • start: index number to start of line, relative to 0
    • end: index number to end of line, relative to 0

    • line: ending line number, relative to 1
    • start: index number to start of line, relative to 0
    • end: index number to end of line, relative to 0

Note: For standard paragraph text, level is 0. A value greater than zero represents the number of markup heading # characters (e.g., ## represents a heading level h2, where level will be 2).

md-image (Object context, Object image)

Invoked for all image references. For example,

![Click Here](https://somelink/foo.png)

The image object has the following properties:

  • inline: a boolean, default true, which indicates a complete link including a URL
  • link: the image URL string
  • alt: a string containing the alt text
  • pos: an object containing location information, with the following properties:
    • line: line number to reference key, relative to 1
    • col: column number to reference key, relative to 1
    • start: index number to start of reference key
    • end: index number to end of reference key

If the image declaration uses a reference link, the image object will have the property inline declared to be false, and the refKey property will replace the link property.

md-code (Object context, Object code)

Invoked for all fenced code blocks (using backticks or tildes). For example,

```
// Installation instructions
npm install -g @oracle/oraclejet-audit
```

The code object has the following properties:

  • code: a string containing the code block, with /n newline characters used as separators
  • pos: an object containing two objects that hold the start and end location info, respectively, in the following format:
    • line: starting line number, relative to 1
    • start: index number to start of code block, relative to 0
    • end: index number to end of line, relative to 0

    • line: ending line number, relative to 1
    • start: index number to start of line, relative to 0
    • end: index number to end of code block, relative to 0
md-list (Object context, Object list)

Invoked for ordered or unordered lists using the markup * or n. notation.

The list object has the following properties:

  • ordered: a boolean, with false used for unordered lists and true for ordered lists
  • items: an array of list item objects, each with an item property referring to a string value
  • pos: an array containing two objects that hold the list start and end location info, respectively, in the following format:
    • line: starting line number, relative to 1
    • start: index number to start of line relative to 0
    • end: index number to end of line, relative to 0

    • line: ending line number, relative to 1
    • start: index number to start of line, relative to 0
    • end: index number to end of line, relative to 0

If a list item represents a sub-list, the children property is used within the list item. The children property is an array containing sub-list objects; each object is formatted the same as the list object, with ordered, items, and pos properties.

Listener Types for JavaScript/TypeScript Rules

The Oracle JAF audit engine supports listener types specific to JavaScript/TypeScript source files.

The following table describes the listener event types for the various data nodes that JAF may encounter when parsing the contents of JavaScript/TypeScript files and generating an abstract syntax tree (AST) for the parsed files. You implement audit rules for the JavaScript/TypeScript files of your application by registering an event listener on the desired JavaScript/TypeScript node.

Listener Type Listener Type Listener Type

AssignmentExpression

AssignmentPattern

ArrayExpression

ArrayPattern

ArrowFunctionExpression

AwaitExpression

BlockStatement

BinaryExpression

BreakStatement

CallExpression

CatchClause

ClassBody

ClassDeclaration

ClassExpression

ConditionalExpression

ContinueStatement

DoWhileStatement

DebuggerStatement

EmptyStatement

ExperimentalRestProperty

ExperimentalSpreadProperty

ExpressionStatement

ForStatement

ForInStatement

ForOfStatement

FunctionDeclaration

FunctionExpression

Identifier

IfStatement

Literal

LabeledStatement

LogicalExpression

MemberExpression

MetaProperty

MethodDefinition

NewExpression

ObjectExpression

ObjectPattern

Program

Property

RestElement

ReturnStatement

SequenceExpression

SpreadElement

Super

SwitchCase

SwitchStatement

TaggedTemplateExpression

TemplateElement

TemplateLiteral

ThisExpression

ThrowStatement

TryStatement

UnaryExpression

UpdateExpression

VariableDeclaration

VariableDeclarator

WhileStatement

WithStatement

YieldExpression

JSXIdentifier

JSXNamespacedName

JSXMemberExpression

JSXEmptyExpression

JSXExpressionContainer

JSXElement

JSXClosingElement

JSXOpeningElement

JSXAttribute

JSXSpreadAttribute

JSXText

ExportDefaultDeclaration

ExportNamedDeclaration

ExportAllDeclaration

ExportSpecifier

ImportDeclaration

ImportSpecifier

ImportDefaultSpecifier

ImportNamespaceSpecifier

As an alternative to the AST node types defined above, an object of abbreviated string constants can be found in the rule context. For example:

var NT = ruleCtx.utils.AstUtils.getNodeTypes() ;
 
if (node.type === NT.CALL_EXPR || node.type === NT.MEMBER_EXPR)  {
   . . .
}

In the register context, the node types object can be found in regCtx.jsNodeTypes() or regCtx.tsNodeTypes(), depending on whether the rule handles JavaScript or TypeScript. The following example caches the node types for JavaScript.

var NT ;
 
register(regXtx)  {
   NT = regCtx.jsNodeTypes ;     // cache the node types
   . . .
}

Here is a list of available constants:

Constant Node Type
ARRAY_EXPR "ArrayExpression"
ARROW_FUNC_EXPR "ArrowFunctionExpression"
ASSIGN_PATTERN "AssignmentPattern"
ASSIGN_EXPR "AssignmentExpression"
ASSIGNMENT_EXPR "AssignmentExpression"
AWAIT_EXPR "AwaitExpression"
BINARY_EXPR "BinaryExpression"
BLOCK_STMT "BlockStatement"
BREAK_STMT "BreakStatement"
CALL_EXPR "CallExpression"
CATCH_CLAUSE "CatchClause"
CLASS_BODY "ClassBody"
CLASS_DECLARATION "ClassDeclaration"
CONDITIONAL_EXPR "ConditionalExpression"
CONTINUE_STMT "ContinueStatement
CLASS_EXPR "ClassExpression"
DO_WHILE_STMT "DoWhileStatement"
DEBUG_STMT "DebuggerStatement"
EMPTY_STMT "EmptyStatement"
EX_REST_PROP "ExperimentalRestProperty"
EXPR_STMT "ExpressionStatement"
EX_SPREAD_STMT "ExperimentalSpreadProperty"
FOR_STMT "ForStatement"
FOR_IN_STMT "ForInStatement"
FOR_OF_STMT "ForOfStatement"
FUNC_DECLARATION "FunctionDeclaration"
FUNC_EXPR "FunctionExpression"
IDENTIFIER "Identifier"
IF_STMT "IfStatement"
LOGIC_EXPR "LogicalExpression"
LABELED_STMT "LabeledStatement"
LITERAL "Literal"
MEMBER_EXPR "MemberExpression"
META_PROP "MetaProperty"
METH_DEF "MethodDefinition"
NEW_EXPR "NewExpression"
OBJ_EXPR "ObjectExpression"
OBJ_PATTERN "ObjectPattern"
PROGRAM "Program"
PROPERTY "Property"
PROPERTY_DEF

"PropertyDefintion"

Note:

The parent node of an ArrowFunctionExpression used to define a class method may be changed when using the newer AST parser library from ClassProperty to this PropertyDefintion node type
REST_ELEM "RestElement"
RETURN_STMT "ReturnStatement"
SEQUENCE_EXPR "SequenceExpression"
SPREAD_ELEM "SpreadElement"
SUPER "Super"
SWITCH_CASE "SwitchCase"
SWITCH_STMT "SwitchStatement"
TAGGED_TEMPLATE_EXPR "TaggedTemplateExpression"
TEMPLATE_ELEM "TemplateElement"
TEMPLATE_LIT "TemplateLiteral"
THIS_EXPR "ThisExpression"
THROW_EXPR "ThrowExpression"
TRY_STMT "TryStatement"
UNARY_EXPR "UnaryExpression"
UPDATE_EXPR "UpdateExpression"
VAR_DECLARATION "VariableDeclaration"
VAR_DECLARATOR "VariableDeclarator"
WHILE_STMT "WhileStatement"
WITH_STMT "WithStatementt"
YIELD_EXPR "YieldExpression"
JSX_ID "JSXIdentifier"
JSX_NS_NAME "JSXNamespacedName"
JSX_EMPTY_EXPR "JSXEmptyExpression"
JSX_EXPR_CONTAINER "JSXExpressionContainer"
JSX_ELEM "JSXElement"
JSX_CLOSING_ELEM "JSXClosingElement"
JSX_OPENING_ELEM "JSXOpeningElement"
JSX_ATTRIB "JSXAttribute"
SX_SPREAD_ATTRIB "JSXSpreadAttribute"
JSX_TEXT "JSXText"
EXPORT_DEFAULT_DECL "ExportDefaultDeclaration"
EXPORT_NAMED_DECL "ExportNamedDeclaration"
EXPORT_ALL_DECL "ExportAllDeclaration"
EXPORT_SPECIFIER "ExportSpecifier"
IMPORT_DECL "ImportDeclaration"
IMPORT_EQUALS_DECL "TSImportEqualsDeclaration"
IMPORT_SPECIFIER "ImportSpecifier"
IMPORT_DEFAULT_SPECIFIER "ImportDefaultSpecifier"
IMPORT_NS_SPECIFIER "ImportNamespaceSpecifier"
EXTERN_MOD_REF "TSExternalModuleReference"

Listener Types for TSX Rules

The Oracle JAF audit engine supports listener types specific to TSX files.

The following table describes the listener event types for the various data nodes that JAF may encounter when parsing the contents of TSX files and generating an abstract syntax tree (AST) for the parsed files. You implement audit rules for the TSX files of your application by registering an event listener on the desired node. The table also list the expected arguments that you supply in the registered listener and the context properties that your listener can access on the event for a particular node.

Listener Type Listener Signature Description, Including Available Context Properties

TsxRenderComponent

(Object ruleContext, Object tsxRenderComponent)

Called for an associated group of TSX renderable content (that is, multiple component/HTML markup elements in a single declaration, such as a render() call, or a variable declaration, and so on.)

TsxComponent

(Object ruleContext, Object tsxComponent)

Called for any component/HTML element/Preact function found in the TSX renderable content.

TsxWebComponent

(Object ruleContext, Object tsxComponent)

Called for any web component known to JAF found in the TSX renderable content.

TsxJetComponent

(Object ruleContext, Object tsxComponent)

Called for any JET web component (legacy or Jet Core pack)

TsxElem

(Object ruleContext, Object tsxComponent)

Called for any standard HTML element found in the TSX renderable content.

TsxProperty

(Object ruleContext, Object tsxProperty)

Called for any property found in the TSX renderable content.

Tsx<component_name>

(Object ruleContext, Object tsxComponent)

Called for the named component/HTML element element found in the TSX renderable content.

Tsx<component_name propName=>

(Object ruleContext, Object tsxProperty)

Called for the named component/HTML element and named property found in the TSX renderable content.

Tsx<propName=>

(Object ruleContext, Object tsxProperty)

Called for the named property found in the TSX renderable markup.

Additionally, all file hook listener types (such as file and endfile) and any AST node types are permitted.

Note:

For named properties and events, the TSX form shown above must be used. That is, an event type of the form <oj-foo> cannot be used. It must be declared as Tsx<oj-foo>.