-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I tried including this in a Nuxt (vue.js) project, that has server side rendering, with this basic example:
<template>
<div>
<h1>Hi World</h1>
</div>
</template>
<script>
import jPopup from 'jPopup';
export default {
data () {
return {
popup: null
}
},
mounted () {
// eslint-disable-next-line new-cap
this.popup = new jPopup({ // initialize jPopup
content: '<p>Lorem Ipsum...</p>',
transition: 'fade',
onOpen: ($popupElement) => {
console.log('popup open');
},
onClose: ($popupElement) => {
console.log('popup closed');
}
});
this.popup.open();
}
}
</script>
<style lang="scss" scoped>
</style>
However, it will crash the whole app:
document is not defined
Metadata
Metadata
Assignees
Labels
No labels