Completed
Pull Request — master (#230)
by
unknown
02:14 queued 14s
created

Components/BlockCookieNotification/script.js   A

Size

Lines of Code 30

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
nc 1
dl 0
loc 30
rs 10
c 2
b 0
f 0
noi 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A script.js ➔ ??? 0 7 1
1
import $ from 'jquery'
2
3
import * as acceptButton from './Partials/AcceptButton/script.js'
4
5
class BlockCookieNotification extends window.HTMLDivElement {
6
  constructor (self) {
7
    self = super(self)
8
    self.$ = $(self)
9
    self.setOptions()
10
    self.resolveElements()
11
    return self
0 ignored issues
show
Bug introduced by
The constructor does not have a meaningful return value. Are you sure this is correct?
Loading history...
12
  }
13
14
  setOptions () {
15
    this.options = {
16
      acceptButton: acceptButton.getOptions()
17
    }
18
  }
19
20
  resolveElements () {
21
    
22
  }
23
24
  connectedCallback () {
25
    this.$.on('click', '.acceptButton', acceptButton.acceptCookies(this.$, this.options.acceptButton.cookieName, this.options.acceptButton.expireDays))
26
    acceptButton.checkCookies(this.$, this.options.acceptButton.cookieName)
27
  }
28
}
29
30
window.customElements.define('flynt-block-cookie-notification', BlockCookieNotification, {extends: 'div'})
31