import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
Vue.config.productionTip = false
declare module 'vue/types/vue' {
interface Vue {
$Kota: () => void
}
}
const Plugin = {
install(Vue: any, options?: any) {
Vue.prototype.$Kota = function () {
console.log('Мяу')
}
}
}
Vue.use(Plugin)
new Vue({
router,
store,
render: h => h(App),
}).$mount('#app')
const names = [ 'DIV', 'P', 'SPAN', ... ];
if (names.includes(el.nextSibling.nodeName)) {
...
function base64ToArrayBuffer(base64) {
var binary_string = window.atob(base64);
var len = binary_string.length;
var bytes = new Uint8Array( len );
for (var i = 0; i < len; i++) {
bytes[i] = binary_string.charCodeAt(i);
}
return bytes.buffer;
}
var newdiv = document.createElement("div");
newdiv.innerHTML = someString;
var container = document.getElementById(id);
container.appendChild(newdiv);