Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted() {
if (this.$slots.default) {
this.$freezeframe = new Freezeframe(this.$el, this.options);
} else if (this.src) {
this.$freezeframe = new Freezeframe(this.$refs.img, this.options);
}
this.addEventListeners();
},
methods: {
mounted() {
if (this.$slots.default) {
this.$freezeframe = new Freezeframe(this.$el, this.options);
} else if (this.src) {
this.$freezeframe = new Freezeframe(this.$refs.img, this.options);
}
this.addEventListeners();
},
methods: {
componentDidMount() {
this.$freezeframe = new Freezeframe(this.freeze.current, this.props.options);
this.$freezeframe.on('toggle', (items, isPlaying) => {
const event = isPlaying ? 'Start' : 'Stop';
if (this.props[`on${event}`] instanceof Function) {
this.props[`on${event}`](items, isPlaying);
}
if (this.props.onToggle instanceof Function) {
this.props.onToggle(items, isPlaying);
}
});
}