0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-29 00:22:05 +01:00

Add window and document to globals

To prevent the following warning message:

```
(!) svelte plugin: 'window' is not defined
src/templates/Share.svelte
20: </script>
21:
22: {#if window.navigator.share}
         ^
23:   <button class="icon-share2" on:click="{shareNatively}" title="Share"></button>
24: {:else}
```
This commit is contained in:
Julien Mourer 2019-05-08 20:47:17 +02:00
parent 3d9cb3b611
commit 4631b1b93f

View File

@ -10,6 +10,7 @@ export const globals = new Set([
'Date',
'decodeURI',
'decodeURIComponent',
'document',
'encodeURI',
'encodeURIComponent',
'Infinity',
@ -31,6 +32,7 @@ export const globals = new Set([
'Set',
'String',
'undefined',
'window',
]);
export const reserved = new Set([