class final
class DebugElement extends DebugNode {
name: string
properties: {...}
attributes: {...}
classes: {...}
styles: {...}
childNodes: DebugNode[]
nativeElement: any
children: DebugElement[]
query(predicate: Predicate<DebugElement>): DebugElement
queryAll(predicate: Predicate<DebugElement>): DebugElement[]
queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]
triggerEventHandler(eventName: string, eventObj: any): void
// inherited from core/DebugNode
listeners: DebugEventListener[]
parent: DebugElement | null
nativeNode: any
injector: Injector
componentInstance: any
context: any
references: {...}
providerTokens: any[]
} | Property | Description |
|---|---|
name: string | Read-Only The element tag name, if it is an element. |
properties: {
[key: string]: any;
} | Read-Only A map of property names to property values for an element. This map includes:
|
attributes: {
[key: string]: string | null;
} | Read-Only A map of attribute names to attribute values for an element. |
classes: {
[key: string]: boolean;
} | Read-Only A map containing the class names on the element as keys. This map is derived from the Note: The values of this object will always be See also: |
styles: {
[key: string]: string | null;
} | Read-Only The inline styles of the DOM element. Will be See also: |
childNodes: DebugNode[] | Read-Only The See also: |
nativeElement: any | Read-Only The underlying DOM element at the root of the component. |
children: DebugElement[] | Read-Only The immediate |
| query() | |||
|---|---|---|---|
|
predicate | Predicate |
DebugElement: the first DebugElement that matches the predicate at any depth in the subtree.
| queryAll() | |||
|---|---|---|---|
|
predicate | Predicate |
DebugElement[]: All DebugElement matches for the predicate at any depth in the subtree.
| queryAllNodes() |
|---|
| triggerEventHandler() | ||||||
|---|---|---|---|---|---|---|
| Triggers the event by its name if there is a corresponding listener in the element's See also: | ||||||
|
eventName | string | The name of the event to trigger |
eventObj | any | The event object expected by the handler |
void
If the event lacks a listener or there's some other problem, consider calling nativeElement.dispatchEvent(eventObject).
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/core/DebugElement