vue-safe-iframe
Version:
Safely include html in a iframe
26 lines (20 loc) • 459 B
JavaScript
import component from './SafeIFrame.vue'
export function install(Vue) {
if (install.installed) return
install.installed = true
Vue.component('VueSafeIframe', component)
}
const plugin = {
install
}
let GlobalVue = null
if (typeof window !== 'undefined') {
GlobalVue = window.Vue
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue
}
if (GlobalVue) {
GlobalVue.use(plugin)
}
export default plugin
export const SafeIFrame = component