Skip to content

Commit

Permalink
fix: remove defer and async for now
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Sep 22, 2019
1 parent a01fa20 commit 82f4e61
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { onMounted, reactive, toRefs } from '@vue/composition-api';

interface ScriptOptions {
src: string;
async?: boolean;
defer?: boolean;
module?: boolean;
// async?: boolean;
// defer?: boolean;
// module?: boolean;
}

export function useScript(opts: ScriptOptions) {
Expand All @@ -17,9 +17,9 @@ export function useScript(opts: ScriptOptions) {
const promise = new Promise((resolve, reject) => {
onMounted(() => {
const script = document.createElement('script');
script.async = opts.async || true;
script.async = opts.defer || true;
script.noModule = !opts.module || false;
// script.async = opts.async || true;
// script.async = opts.defer || true;
// script.noModule = !opts.module || false;
script.onload = function() {
state.isLoading = false;
state.success = true;
Expand Down

0 comments on commit 82f4e61

Please sign in to comment.