3. #DeveloperStudentClubs
• Custom Elements를 선언하는 방법
• Component에 리스너와 핸들러를 추가하는 방법
• Custom Design을 캡슐화하기위한 Shadow Root를 만드는 방법
• 여러 응용 프로그램을 구성하여 작은 응용 프로그램을 만드는 방법
참고 한글 사이트 https://jyami.tistory.com/37
4. #DeveloperStudentClubs
1. Custom Element 만들기
Custom Element HTMLElement라는 ES6의 클래스를 상속받은 것
connectedCallback() : document의 DOM에 정의한 custom element가 맨 처음 호출되었을 때 실행
문법 > customElements.defind(DOMString, class, { extends: '[tag-name]' })
6. #DeveloperStudentClubs
2. Drag And Drop
[이벤트를 부착하려는 element].addEventListener( ‘event 이름’ , (ev) => {
[해당 이벤트가 발생할 때 실행할 동작들]
console.log(ev);
});
const ev = new CustomEvent('image', params);