Completed
Pull Request — develop (#230)
by Markus
05:18 queued 03:24
created

Components/BlockCookieNotification/script.js   A

Size

Lines of Code 21

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A script.js ➔ ??? 0 5 1
1
import $ from 'jquery'
2
3
import * as acceptButton from './Partials/AcceptButton/script'
4
5
class BlockCookieNotification extends window.HTMLDivElement {
6
  constructor (self) {
7
    self = super(self)
8
    self.$ = $(self)
9
    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...
10
  }
11
12
  connectedCallback () {
13
    this.$.on('click', '.acceptButton', (e) => {
14
      e.preventDefault()
15
      acceptButton.acceptCookies(this.$)
16
    })
17
    acceptButton.checkCookies(this.$)
18
  }
19
}
20
21
window.customElements.define('flynt-block-cookie-notification', BlockCookieNotification, {extends: 'div'})
22