MCPcopy
hub / github.com/rrweb-io/rrweb / getValidTagName

Function getValidTagName

packages/rrdom/src/index.ts:202–208  ·  view source on GitHub ↗
(element: HTMLElement)

Source from the content-addressed store, hash-verified

200 K extends keyof RRElementTagNameMap ? RRElementTagNameMap[K] : RRElement;
201
202function getValidTagName(element: HTMLElement): string {
203 // https://github.com/rrweb-io/rrweb-snapshot/issues/56
204 if (element instanceof HTMLFormElement) {
205 return 'FORM';
206 }
207 return element.tagName.toUpperCase();
208}
209
210/**
211 * Build a RRNode from a real Node.

Callers 1

buildFromNodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected