Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import devtools from '@vue/devtools';
import MeetingSchedulerView from 'view/MeetingSchedulerView';
import { INTERNAL_EVENTS } from 'constants';
/**
* @vue/devtools will be replace with an empty module by webpack null-loader for
* production build.
*/
if (devtools && devtools.connect) {
devtools.connect('localhost', 8098);
}
if (window.parent !== window) {
// only execute this script when launched inside iframe
const id = window.location.hash.substr(1);
setTimeout(() => {
const scheduler = new MeetingSchedulerView({
id,
});
scheduler.messenger.connect(window.parent);
scheduler.messenger.send({
event: INTERNAL_EVENTS.VIEW_LOAD,
}, '*');
}, 0);
}
showToast,
io() {
try {
const SocketIO = require('nativescript-socketio').SocketIO
const address = `http://${getServerIpAddress(host, port)}`
let socketIO = new SocketIO(address, {debug: debug})
socketIO.connect()
return socketIO
} catch (error) {
console.log(error)
}
}
})
devtools.init(Vue);
}
const setupDevtools = () => {
devtools.connect('ws://localhost', port, {
app: this,
showToast,
io() {
try {
const SocketIO = require('nativescript-socketio').SocketIO
const address = `http://${getServerIpAddress(host, port)}`
let socketIO = new SocketIO(address, {debug: debug})
socketIO.connect()
return socketIO
} catch (error) {
console.log(error)
}
}
})