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

Method attach

src/cdk/drag-drop/preview-ref.ts:62–71  ·  view source on GitHub ↗
(parent: HTMLElement)

Source from the content-addressed store, hash-verified

60 ) {}
61
62 attach(parent: HTMLElement): void {
63 this._preview = this._createPreview();
64 parent.appendChild(this._preview);
65
66 // The null check is necessary for browsers that don't support the popover API.
67 // Note that we use a string access for compatibility with Closure.
68 if (supportsPopover(this._preview)) {
69 this._preview['showPopover']();
70 }
71 }
72
73 destroy(): void {
74 this._preview.remove();

Callers

nothing calls this directly

Calls 2

_createPreviewMethod · 0.95
supportsPopoverFunction · 0.85

Tested by

no test coverage detected