Skip to content

Commit 63ac399

Browse files
fix: allow reassignment of HTMLElement.prototype.focus and .blur (#1265)
Co-authored-by: Philipp Fritsche <[email protected]>
1 parent c6ae212 commit 63ac399

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/document/patchFocus.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ export function patchFocus(HTMLElement: typeof globalThis['HTMLElement']) {
2020
Object.defineProperties(HTMLElement.prototype, {
2121
focus: {
2222
configurable: true,
23-
get: () => patchedFocus,
23+
value: patchedFocus,
24+
writable: true,
2425
},
2526
blur: {
2627
configurable: true,
27-
get: () => patchedBlur,
28+
value: patchedBlur,
29+
writable: true,
2830
},
2931
[patched]: {
3032
configurable: true,

0 commit comments

Comments
 (0)