MCPcopy Create free account
hub / github.com/angular/components / create

Method create

src/cdk/a11y/focus-trap/focus-trap.ts:387–396  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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. */

Callers 3

ngAfterViewInitMethod · 0.45
constructorMethod · 0.45
ngAfterViewInitMethod · 0.45

Calls

no outgoing calls

Tested by 2

ngAfterViewInitMethod · 0.36
ngAfterViewInitMethod · 0.36