MCPcopy
hub / github.com/stutrek/scrollmonitor / createContainer

Method createContainer

src/container.ts:206–219  ·  view source on GitHub ↗
(input: HTMLElement | NodeList | HTMLElement[] | string)

Source from the content-addressed store, hash-verified

204 }
205
206 createContainer(input: HTMLElement | NodeList | HTMLElement[] | string) {
207 let item: HTMLElement;
208 if (typeof input === 'string') {
209 item = document.querySelector(input) as HTMLElement;
210 } else if (Array.isArray(input) || input instanceof NodeList) {
211 item = input[0] as HTMLElement;
212 } else {
213 item = input;
214 }
215 var container = new ScrollMonitorContainer(item, this);
216 this.updateState();
217 container.listenToDOM();
218 return container;
219 }
220
221 create(input: WatchItemInput, offsets?: Offsets) {
222 let item: WatchItem;

Callers

nothing calls this directly

Calls 2

updateStateMethod · 0.95
listenToDOMMethod · 0.95

Tested by

no test coverage detected