• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

panates / opra / 29494915195

16 Jul 2026 11:33AM UTC coverage: 83.024% (+0.4%) from 82.653%
29494915195

push

github

erayhanoglu
1.29.1

4118 of 5238 branches covered (78.62%)

Branch coverage included in aggregate %.

34348 of 41093 relevant lines covered (83.59%)

239.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.29
/packages/common/src/document/common/document-element.ts
1
import { asMutable } from 'ts-gems';
1✔
2
import { uid } from 'uid';
1✔
3
import { DocumentNode } from './document-node.js';
1✔
4

1✔
5
interface DocumentElementConstructor {
1✔
6
  new (owner?: DocumentElement): DocumentElement;
1✔
7

14,829✔
8
  prototype: DocumentElement;
14,829!
9
}
×
10

×
11
/**
×
12
 * @class DocumentElement
×
13
 */
×
14
export interface DocumentElement extends DocumentElementClass {}
14,829✔
15

14,829✔
16
/**
14,829✔
17
 *
14,829✔
18
 * @constructor DocumentElement
14,829✔
19
 */
14,829✔
20
export const DocumentElement = function (
14,829✔
21
  this: DocumentElement,
14,829✔
22
  owner?: DocumentElement,
14,829✔
23
) {
14,829✔
24
  if (!this)
14,829✔
25
    throw new TypeError('"this" should be passed to call class constructor');
14,829✔
26
  const _this = asMutable(this);
14,521✔
27
  _this.id = uid(16);
14,521✔
28
  Object.defineProperty(_this, 'node', {
14,521✔
29
    value: new DocumentNode(this, owner?.node),
1✔
30
    enumerable: false,
1✔
31
    writable: true,
1✔
32
  });
1✔
33
  if (owner) {
1✔
34
    Object.defineProperty(_this, 'owner', {
1✔
35
      value: owner,
1✔
36
      enumerable: false,
1✔
37
      writable: true,
1✔
38
    });
1✔
39
  }
1✔
40
} as Function as DocumentElementConstructor;
1✔
41

1✔
42
/**
1✔
43
 * @class DocumentElement
1✔
44
 */
1✔
45
abstract class DocumentElementClass {
1✔
46
  declare readonly id: string;
1✔
47
  declare readonly owner?: DocumentElement;
1✔
48
  declare readonly node: DocumentNode;
1✔
49
}
1✔
50

1✔
51
DocumentElement.prototype = DocumentElementClass.prototype;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc