1월 5주차 읽기자료

이동규 (Justin)·2025년 1월 26일
0

읽어야 산다

목록 보기
13/14
post-thumbnail

1. Lit.dev - properties

Lit component의 프로퍼티에 대해 알아보자.

2. JavaScript.info - DOM attributes and properties

위 문서를 읽던 중

Set up an obseved attribute with the lowercased name of each property.

라는 문장이 있었다. attribute랑 property가 헷갈려 찾게 된 글.

HTML이 DOM이라는 자바스크립트 객체로 파싱될 때, HTML로 attributes들이 JavaScript Property로 언제 일대일로 매핑 되거나 되지 않는지에 대해 알아볼 수 있다.

조금만 더 발췌하자면,

For most situations using DOM properties is preferable. We should refer to attributes only when DOM properties do not suit us, when we need exactly attributes, for instance

  • We need a non-standard attribute. then using data-* attribute which can be customized and not to be conflicted with future HTML standards.
  • We want to read the value as written in HTML. THe value of the DOM property may be different, for instance the href property is always a full URL, and we may want to get the original value.

3. CSS-Tricks, Louis Lazaris - An Introduction and Guide to the CSSOM

또한 위 문서를 읽던 중, div.styleCSSStyleDeclaration 이라는 객체를 반환한다는 것을 발견해 찾아보았더니 이는 CSSOM 스펙 중 일부였고, CSSOM이 궁금해져 찾아본 결과 이런 좋은 Introduction을 발견.

4. Jacob milhorn - Solving FOUC in Web Component

웹 컴포넌트를 사용한다면 필독.

profile
Visual Programming is in Progress..

0개의 댓글

관련 채용 정보