Completed
Pull Request — develop (#230)
by
unknown
04:06 queued 02:05
created

script.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
cc 1
c 5
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 9.4285
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
    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...
11
  }
12
13
  setOptions () {
14
    this.options = {
15
      acceptButton: acceptButton.getOptions()
16
    }
17
  }
18
19
  connectedCallback () {
20
    this.$.on('click', '.acceptButton', acceptButton.acceptCookies(this.$, this.options.acceptButton.cookieName, this.options.acceptButton.expireDays))
21
    acceptButton.checkCookies(this.$, this.options.acceptButton.cookieName)
22
  }
23
}
24
25
window.customElements.define('flynt-block-cookie-notification', BlockCookieNotification, {extends: 'div'})
26