https://github.com/chinsun9/webapi-observer-practice
https://github.com/chinsun9/webapi-observer-practice
observer practice webapi
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chinsun9/webapi-observer-practice
- Owner: chinsun9
- Created: 2021-09-28T00:22:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-28T03:52:03.000Z (over 3 years ago)
- Last Synced: 2025-01-30T08:43:06.860Z (5 months ago)
- Topics: observer, practice, webapi
- Language: JavaScript
- Homepage: https://chinsun9.github.io/webapi-observer-practice/
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webapi-observer-practice
> mutation observer로 돔 변경 감시
- 버튼 누르면 target 엘리먼트에 `hello`클래스를 토글 한다
- 옵저버는 target 엘리먼트의 attributes 변경을 감지한다
- 콜백에서는 target 엘리먼트에 `hello`클래스가 있을 때만 count를 증가시킨다