changed getElementId to query selector because getelementId is a global method

This commit is contained in:
Miguel 2024-09-11 22:16:19 -04:00
parent 1f37fda94f
commit 36aa29dd95

View file

@ -59,11 +59,11 @@ template.innerHTML = `
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
</style>
/* the div block has an id and class so that its targeted by the styles
and the component underneath */
</style>
<div id="mySidenav" class="sidenav">
@ -100,8 +100,8 @@ class ProfileSideBar extends HTMLElement {
constructor() { // the constructor function initiates the new side bar
super()
this.appendChild(template.content.cloneNode(true))
this.sidenav = this.getElementById("#mySidenav");
this.openBtn = this.getElementById("#openBtn");
this.sidenav = this.querySelector("#mySidenav");
this.openBtn = this.querySelector("#openBtn");
this.closeBtn = this.querySelector(".closeBtn");
this.mainContent = document.getElementById("main");