Ver código fonte

can we log that

Renée Kooi 6 anos atrás
pai
commit
0949f462cd
1 arquivos alterados com 7 adições e 2 exclusões
  1. 7 2
      test/endtoend/typescript/main.ts

+ 7 - 2
test/endtoend/typescript/main.ts

@@ -8,6 +8,12 @@ import Webcam = require('@uppy/webcam')
 import Tus = require('@uppy/tus')
 import Form = require('@uppy/form')
 
+window.onerror = (err) => {
+  const el = document.createElement('p') as HTMLParagraphElement
+  el.textContent = err.stack
+  document.body.appendChild(el)
+}
+
 const TUS_ENDPOINT = 'https://master.tus.io/files/'
 
 const uppy = Uppy({
@@ -18,9 +24,8 @@ const uppy = Uppy({
   }
 })
   .use(Dashboard, {
+    target: document.body,
     trigger: '#pick-files',
-    // inline: true,
-    // target: 'body',
     metaFields: [
       { id: 'license', name: 'License', placeholder: 'specify license' },
       { id: 'caption', name: 'Caption', placeholder: 'add caption' }