Skip to content

Commit

Permalink
fix: Illegal invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
yhdgms1 committed Oct 12, 2021
1 parent dc2344f commit 986e687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Use SVG foreignObject to render images of HTML content",
"author": "Artem Schukin",
"license": "MIT",
"version": "0.1.3",
"version": "0.1.4",
"type": "module",
"homepage": "https://github.com/Artemis69/svg-foreignobject-screenshot",
"repository": {
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import {
shouldProxy,
} from './lib'

const createElement = document.createElement
const createElement = <K extends keyof HTMLElementTagNameMap>(
tagName: K,
options?: ElementCreationOptions
): HTMLElementTagNameMap[K] => document.createElement(tagName, options)

const serialize = (node: Node) => new XMLSerializer().serializeToString(node)

Expand Down

0 comments on commit 986e687

Please sign in to comment.