pushfeedback 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/feedback-button_2.cjs.entry.js +7743 -681
- package/dist/collection/components/feedback-modal/feedback-modal.js +4 -4
- package/dist/components/feedback-modal2.js +7742 -680
- package/dist/esm/feedback-button_2.entry.js +7743 -681
- package/dist/pushfeedback/p-73488a64.entry.js +22 -0
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/package.json +2 -2
- package/dist/pushfeedback/p-9ac3c49b.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
import
|
|
2
|
+
import html2canvas from 'html2canvas';
|
|
3
3
|
export class FeedbackModal {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.handleSubmit = async (event) => {
|
|
@@ -137,13 +137,13 @@ export class FeedbackModal {
|
|
|
137
137
|
const clonedElementSelected = this.elementSelected.cloneNode(true);
|
|
138
138
|
document.body.appendChild(clonedElementSelected);
|
|
139
139
|
this.elementSelected.style.top = `${top}px`;
|
|
140
|
-
this.encodedScreenshot =
|
|
141
|
-
.
|
|
140
|
+
this.encodedScreenshot = html2canvas(document.body).then(canvas => {
|
|
141
|
+
const dataUrl = canvas.toDataURL();
|
|
142
142
|
document.body.removeChild(clonedElementSelected);
|
|
143
143
|
return dataUrl;
|
|
144
144
|
})
|
|
145
145
|
.catch(function (error) {
|
|
146
|
-
console.error(
|
|
146
|
+
console.error(error);
|
|
147
147
|
return "";
|
|
148
148
|
});
|
|
149
149
|
const page = document.getElementsByTagName('html')[0];
|