attribute-propertyリフレクション
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2021/11/14 16:21 UTC 版)
「Web Components」の記事における「attribute-propertyリフレクション」の解説
HTMLの要素において、attributes(content attributes)とproperty(IDL attributes)は必ずしも値がリンクしない(HTML要素 § AttributeとProperty)。Web Componentsにおいていわゆるreflectionを可能にするには、そのための仕組みが必要になる。attributesはすべて文字列と定義されており、またpropertyは暗示的に静的型を持つため、propertyの型を事前に定義しattributesへのアクセス時に適切な型変換(文字列化、定義された型へのparse)をおこなうのが基本的な仕組みになる。
※この「attribute-propertyリフレクション」の解説は、「Web Components」の解説の一部です。
「attribute-propertyリフレクション」を含む「Web Components」の記事については、「Web Components」の概要を参照ください。
- attribute-propertyリフレクションのページへのリンク