change to query selector

This commit is contained in:
cyber-dream 2023-04-13 20:09:14 +03:00
parent 9478c6c8dd
commit eaa3ce9d5d

View File

@ -22,11 +22,10 @@ class PersonalProperties{
newWindow.innerHTML = html
let closeButton = newWindow.querySelector("closeWindowButton")
let scrollDiv = newWindow.children[1]
let scrollBar = new WdeScrollBar(scrollDiv.children[1].children[0], scrollDiv.children[0])
let scrollBar = new WdeScrollBar(newWindow.querySelector('.ScrollBarScrollElement'), newWindow.querySelector('.ScrollContent'))
closeButton.addEventListener('click', function (params) {
newWindow.querySelector("#closeWindowButton").addEventListener('click', () => {
console.log("qewqweqweqweqwe")
WebDesktopEnvironment.CloseWindow(newWindow)
})
})