Web Components Slot 사용하기
Web 2021. 8. 15. 14:30

내가 만든 webcomponent 사이에, 사용자 html tag가 customizing 되어 적용되게 하는 방법을 알아보자. 2021.08.15 - [Web] - Web Component publish 공개 하기 Web Component publish 공개 하기 2021.08.14 - [Web] - Web component (Custom Elements, Shadow DOM, Template) 2021.08.14 - [Web] - Web Components Callback Methods & lifecycle 앞서서 Web Component를 만드는 방법에 대해서 알아 보았다... enumclass.tistory.com Slot이 필요한 이유는? 앞서 작성한 html의 Component 사용 형상은 아래..

Web component (Custom Elements, Shadow DOM, Template)
Web 2021. 8. 14. 18:34

html의 Web component 사용은 이미 몇년이 지난 이야기이긴 하지만, 정리를 위해서 이곳에 관련 이야기를 담고자 한다. 여기 나오는 내용은 "Getting Started with Components"를 공부하면서 정리한 내용 들이다. https://www.packtpub.com/product/getting-started-with-web-components/9781838649234 해당 서적의 주요 코드는 다음에 위치해 있다. https://github.com/PacktPublishing/Getting-Started-with-Web-Components Custom elements html tag 자체를 만들고 browser 사용할 수 있도록 만들어 주는 것 1. HTMLElement를 상속하는 ..