We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd42c1c commit af388c5Copy full SHA for af388c5
3 files changed
src/components/BootstrapBlazor.Dom2Image/wwwroot/dom2image.js
@@ -0,0 +1,23 @@
1
+import { snapdom } from './lib/snapdom.min.mjs'
2
+
3
+export async function getUrl(selector, options = {}) {
4
+ let data = null;
5
+ const el = document.querySelector(selector);
6
+ if (el) {
7
+ options.embedFonts = true;
8
+ const result = await snapdom(el, options);
9
+ data = result.url;
10
+ }
11
+ return data;
12
+}
13
14
+export async function getStream(selector, options = {}) {
15
16
17
18
19
20
+ data = result.toBlob();
21
22
23
0 commit comments