MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / fakeEl

Function fakeEl

packages/sdk/src/adapters/iframe.test.ts:42–58  ·  view source on GitHub ↗
(
  attrs: Record<string, string>,
  tagName: string,
  parent: FakeEl | null = null,
)

Source from the content-addressed store, hash-verified

40}
41
42function fakeEl(
43 attrs: Record<string, string>,
44 tagName: string,
45 parent: FakeEl | null = null,
46): FakeEl {
47 return {
48 attrs,
49 tagName,
50 parentElement: parent,
51 getAttribute(name) {
52 return Object.prototype.hasOwnProperty.call(this.attrs, name) ? this.attrs[name] : null;
53 },
54 hasAttribute(name) {
55 return Object.prototype.hasOwnProperty.call(this.attrs, name);
56 },
57 };
58}
59
60const visible = () => true;
61const invisible = () => false;

Callers 1

iframe.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected