import { defineComponent, h } from 'vue';

export default defineComponent({
  name: 'JsScript',
  props: {
    src: {
      type: String,
      required: true,
    },
  },
  emits: ['load'],
  render() {
    return h('script', {
      type: 'text/javascript',
      src: this.src,
      onLoad: () => {
        this.$emit('load');
      },
    });
  },
});
