Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,13 +612,13 @@

// hack to avoid TS notification
// about setting undefined value to readonly properties
delete (this as any)._el;

Check warning on line 615 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 20

Unexpected any. Specify a different type

Check warning on line 615 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18

Unexpected any. Specify a different type
delete (this as any)._data;

Check warning on line 616 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 20

Unexpected any. Specify a different type

Check warning on line 616 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18

Unexpected any. Specify a different type
delete (this as any)._events;

Check warning on line 617 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 20

Unexpected any. Specify a different type

Check warning on line 617 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18

Unexpected any. Specify a different type

// remove mutation observer instances
delete (this as any)._mutationObserver;

Check warning on line 620 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 20

Unexpected any. Specify a different type

Check warning on line 620 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18

Unexpected any. Specify a different type
delete (this as any)._mutationObserverCallbacks;

Check warning on line 621 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 20

Unexpected any. Specify a different type

Check warning on line 621 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18

Unexpected any. Specify a different type
}

/** Removes this element. */
Expand Down Expand Up @@ -1045,7 +1045,7 @@
if (!obj) return this.setAttr('d', '');
const attributes: SVGDrawingOptions = {};
for (const p of ['mark', 'arrows', 'round'] as const) {
if (this.hasAttr(p)) attributes[p] = this.attr(p) as any;

Check warning on line 1048 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 20

Unexpected any. Specify a different type

Check warning on line 1048 in src/elements.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18

Unexpected any. Specify a different type
}
if (this.hasClass('fill')) attributes.fill = 'fill';
if (this.hasAttr('size')) attributes.size = (+this.attr('size')) || undefined;
Expand Down Expand Up @@ -1248,6 +1248,14 @@
(this._el as HTMLInputElement).checked = value;
}

get readonly() {
return (this._el as HTMLInputElement).readOnly;
}

set readonly(value: boolean) {
(this._el as HTMLInputElement).readOnly = value;
}

get value() {
return this._el.value;
}
Expand Down
Loading