File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -3,21 +3,7 @@ import App from './App.vue'
3
3
4
4
global . browser = require ( 'webextension-polyfill' )
5
5
Vue . prototype . $browser = global . browser
6
- Vue . directive ( 'click-outside' , {
7
- bind : function ( el , binding , vnode ) {
8
- el . clickOutsideEvent = function ( event ) {
9
- // here I check that click was outside the el and his children
10
- if ( ! ( el === event . target || el . contains ( event . target ) ) ) {
11
- // and if it did, call method provided in attribute value
12
- vnode . context [ binding . expression ] ( event )
13
- }
14
- }
15
- document . body . addEventListener ( 'click' , el . clickOutsideEvent )
16
- } ,
17
- unbind : function ( el ) {
18
- document . body . removeEventListener ( 'click' , el . clickOutsideEvent )
19
- }
20
- } )
6
+
21
7
/* eslint-disable no-new */
22
8
new Vue ( {
23
9
el : '#app' ,
You can’t perform that action at this time.
0 commit comments