Skip to content

Commit 103db29

Browse files
committed
feat: support external script link install
1 parent 01c7101 commit 103db29

File tree

6 files changed

+6302
-3607
lines changed

6 files changed

+6302
-3607
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ yarn add vue-append
3434

3535
### appended
3636

37-
- if html append and no throw error, it will fire `appended` event.
37+
- if html append , script downloaded and no throw error, it will fire `appended` event.
3838

3939
### appenderr
4040

@@ -63,6 +63,10 @@ Vue.use(VueAppend);
6363

6464
const html = `
6565
<div id="test">1</div>
66+
<script
67+
src="https://code.jquery.com/jquery-3.4.1.min.js"
68+
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
69+
crossorigin="anonymous"></script>
6670
<script>
6771
var i = 1;
6872
setInterval(function() {
@@ -79,7 +83,9 @@ new Vue({
7983
},
8084
methods: {
8185
appended() {
82-
console.log('appended!')
86+
console.log('appended!');
87+
// could use jQuery 😊
88+
alert(window.jQuery);
8389
}
8490
}
8591
});

0 commit comments

Comments
 (0)