service2.js: Simplify

This commit is contained in:
Simon Rozman 2024-05-23 12:05:37 +02:00
parent 273c96b78c
commit 85d8f42dba

View File

@ -31,9 +31,7 @@ class BesService {
this.onScroll = this.onScroll.bind(this)
this.hostElement.addEventListener('scroll', this.onScroll)
this.resizeObserver = new ResizeObserver(() => {
this.onResize()
})
this.resizeObserver = new ResizeObserver(this.onResize.bind(this))
this.resizeObserver.observe(this.hostElement)
besServices.push(this)