* Creates a focus-trapped region around the given element. * @param element The element around which focus will be trapped. * @param deferCaptureElements Defers the creation of focus-capturing elements to be done * manually by the user. * @returns The created focus trap instance.
(element: HTMLElement, deferCaptureElements: boolean = false)
| 385 | * @returns The created focus trap instance. |
| 386 | */ |
| 387 | create(element: HTMLElement, deferCaptureElements: boolean = false): FocusTrap { |
| 388 | return new FocusTrap( |
| 389 | element, |
| 390 | this._checker, |
| 391 | this._ngZone, |
| 392 | this._document, |
| 393 | deferCaptureElements, |
| 394 | this._injector, |
| 395 | ); |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | /** Directive for trapping focus within a region. */ |
no outgoing calls