W3cubDocs

/Angular 10

DebugElement

class

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[]
}

Properties

Property Description
name: string Read-Only
properties: { [key: string]: any; } Read-Only
attributes: { [key: string]: string | null; } Read-Only
classes: { [key: string]: boolean; } Read-Only
styles: { [key: string]: string | null; } Read-Only
childNodes: DebugNode[] Read-Only
nativeElement: any Read-Only
children: DebugElement[] Read-Only

Methods

query(predicate: Predicate<DebugElement>): DebugElement

Parameters
predicate Predicate
Returns

DebugElement

queryAll(predicate: Predicate<DebugElement>): DebugElement[]

Parameters
predicate Predicate
Returns

DebugElement[]

queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]

Parameters
predicate Predicate
Returns

DebugNode[]

triggerEventHandler(eventName: string, eventObj: any): void

Parameters
eventName string
eventObj any
Returns

void

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v10.angular.io/api/core/DebugElement