Skip to content

Commit

Permalink
Access document/window object after mounted.
Browse files Browse the repository at this point in the history
  • Loading branch information
potato4d committed Dec 30, 2017
1 parent 64ada0c commit 160736d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const $ = (e) => document.querySelector(e)
const tag = ( !window.chrome && 'WebkitAppearance' in document.documentElement.style ) ? 'body' : 'html'
let $
let tag

export default {
name: 'fixed-header',

mounted () {
$ = (e) => document.querySelector(e)
tag = ( !window.chrome && 'WebkitAppearance' in document.documentElement.style ) ? 'body' : 'html'
this.main()
},

Expand Down

0 comments on commit 160736d

Please sign in to comment.