switer / switer.github.io

Personal homepage
https://switer.github.io
5 stars 0 forks source link

web component--latest #8

Open switer opened 10 years ago

switer commented 10 years ago

按照W3C对web component 介绍(2014年4月),相比2013年的介绍,移除了 decorator ,一个 componet 包含的部件有:

  1. Templates 形态为被动的markup chunks,但是之后可以被激活使用.

    which define chunks of markup that are inert but can be activated for use later.

  2. Custom Elements 使用者自定义的组件元素,基于component的可定制性

    which let authors define their own elements, with new tag names and new script interfaces.

  3. Shadow DOM 我认为它是当前组件的子组件,DOM结构对于当前component为不可见的,但使用当前组件的资源和状态。

    which encapsulates a DOM subtree for more reliable composition of user interface elements.

    • shadow dom拥有elements混入功能,使component的elements插入 shadow dom 树中,vue.js的partial就是该定义的实现
  4. Imports 组件的导入机制

    which defines how templates and custom elements are packaged and loaded as a resource.

link