![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FT6iLb%2FbtrgAMTYQb2%2Fj6cFBv51wHr6adEHJAOJt0%2Fimg.png)
[Javascript] getElementById is not a function
·
프로그래밍/발생한 에러들
요즘 자바스크립트로 Component를 직접 구현하고 있다. 구글링으로 다들 어떻게 했는지 찾아보는데 다들 addEventListener를 사용할 때 querySelector를 사용하더라. "getElementById나 getElementsByClass는 왜 사용안하지...?" 라는 생각이 들어서 직접 사용해보았다. Uncaught TypeError: this.target.getElementById is not a function at Template.setEvent (Template.js:16) at new Component (Components.js:8) at Template._createSuperInternal (app.js:28) at new Template (Template.js:3) at in..