tagChildren
Tags a BrowserSDK:Taggable Element as a root to track one or more of its children by specifying a set of ChildrenTaggingQuery objects.
tagChildren = (parameters: ChildrenTaggingQueries) => TagLocationReturnValue
info
This attribute directive builds on top of BrowserSDK:tagChildren
danger
tagChildren
is a performance-sensitive API. Avoid using it whenever Location Taggers could be used instead.
Parameters
type | ||
---|---|---|
required | parameters | BrowserSDK:ChildrenTaggingQueries |
optional | onError | BrowserSDK:TrackerErrorHandlerCallback |
tagChild - Single query shorthand
Syntactic sugar API built on top of tagChildren which processes a single ChildrenTaggingQuery.
tagChild = (parameters: ChildrenTaggingQuery) => TagLocationReturnValue
Parameters
type | ||
---|---|---|
required | parameters | BrowserSDK:ChildrenTaggingQuery |
optional | onError | BrowserSDK:TrackerErrorHandlerCallback |
Returns
BrowserSDK:TagChildrenReturnValue
Usage example
<div
[tagChildren]="[
{
queryAll: 'button[aria-label="Previous"]',
tagAs: tagPressable({ id: 'prev' })
},
{
queryAll: 'button[aria-label="Next"]',
tagAs: tagPressable({ id: 'next' })
}
]"
>
...
</div>