Re: [WICG/webcomponents] Template/part proposals - Naming for DOM Parts API (#902)

FAST uses "marker" terminology as well. We also use the term "placeholder". Other terms we use that are related include "behavior" and "directive".

In FAST parlance:

* Directives have the responsibility for creating markers and their associated behavior factories.
* The template pre-processor inserts markers/placeholders into html and associates each with a behavior factory instance.
* The template compiler converts placeholders into dom "paths" and removes placeholders. The paths are associated with the original behavior factory indicated by the placeholder. (A path might be something like r.2.4.3, which means "go to the root, then the 2nd child index of that, then the 4th child index of that, then the 3rd child index of that.)
* When a template is instantiated, the factories instantiate behaviors. Each behavior uses its associated path to find the DOM node that it needs to act upon. Then depending on the type of behavior it is, it will apply different effects. Examples include data binding, repeat rendering, conditional rendering, nested template composition, etc.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/902#issuecomment-1341644544
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/902/1341644544@github.com>

Received on Wednesday, 7 December 2022 21:56:18 UTC