mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
remove references to async-fragments in the docs
This commit is contained in:
parent
09111f20c7
commit
22e81c92bb
@ -12,7 +12,7 @@ The Pull Model approach to template rendering requires the use of a templating e
|
||||
|
||||
The problem with the traditional Push Model approach is that template rendering is delayed until _all_ data has been fully received. This reduces the time to first byte, and it also may result in the server sitting idle while waiting for data to be loaded from remote services. In addition, if certain data is no longer needed by a template then only the template needs to be modified and not the controller.
|
||||
|
||||
With the new Pull Model approach, template rendering begins immediately. In addition, fragments of the template that depend on data from data providers are rendered asynchronously and `await` only the associated data provider's completion. The template rendering will only be delayed for data that the template actually needs.
|
||||
With the new Pull Model approach, template rendering begins immediately. In addition, sections of the template that depend on data from data providers are rendered asynchronously and `await` only the associated data provider's completion. The template rendering will only be delayed for data that the template actually needs.
|
||||
|
||||
# Example
|
||||
|
||||
@ -73,7 +73,7 @@ The marko-async taglib also supports out-of-order flushing. Enabling out-of-orde
|
||||
|
||||
2. Add the `<await-reorderer>` to the end of the page.
|
||||
|
||||
If `client-reorder` is `true` then a placeholder element will be rendered to the output instead of the final HTML for the async fragment. The async fragment will be instead rendered at the end of the page and client-side JavaScript code will be used to move the async fragment into the proper place in the DOM. The `<await-reorderer>` will be where the out-of-order fragments are rendered before they are moved into place. If there are any out-of-order fragments then inline JavaScript code will be injected into the page at this location to move the DOM nodes into the proper place in the DOM.
|
||||
If `client-reorder` is `true` then a placeholder element will be rendered to the output instead of the final HTML for the await instance. The instance will be instead rendered at the end of the page and client-side JavaScript code will be used to move the await's contents into the proper place in the DOM. The `<await-reorderer>` will be where the out-of-order instances are rendered before they are moved into place. If there are any out-of-order instances then inline JavaScript code will be injected into the page at this location to move the DOM nodes into the proper place in the DOM.
|
||||
|
||||
# Taglib API
|
||||
|
||||
@ -96,18 +96,18 @@ If `client-reorder` is `true` then a placeholder element will be rendered to the
|
||||
|
||||
* __`arg`__ (expression): The argument object to provide to the data provider function.
|
||||
* __`arg-<arg_name>`__ (string): An argument to add to the `arg` object provided to the data provider function.
|
||||
* __`client-reorder`__ (boolean): If `true`, then the async fragments will be flushed in the order they complete and JavaScript running on the client will be used to move the async fragments into the proper HTML order in the DOM. Defaults to `false`.
|
||||
* __`client-reorder`__ (boolean): If `true`, then the await instances will be flushed in the order they complete and JavaScript running on the client will be used to move the await instances into the proper HTML order in the DOM. Defaults to `false`.
|
||||
* __`error-message`__ (string): Message to output if the data provider errors out.
|
||||
Specifying this will prevent the rendering from aborting.
|
||||
* __`name`__ (string): Name to assign to this async fragment. Used for debugging purposes as well as by the `show-after` attribute (see below).
|
||||
* __`name`__ (string): Name to assign to this await instance. Used for debugging purposes as well as by the `show-after` attribute (see below).
|
||||
* __`placeholder`__ (string): Placeholder text to show while waiting for a data provider to complete. Only applicable if `client-reorder` is set to `true`.
|
||||
* __`show-after`__ (string): When `client-reorder` is set to `true` then displaying this fragment will be delayed until the referenced async fragment is shown.
|
||||
* __`show-after`__ (string): When `client-reorder` is set to `true` then displaying this instance's content will be delayed until the referenced await instance is shown.
|
||||
* __`timeout`__ (integer): Override the default timeout of 10 seconds with this param. Units are inmilliseconds so `timeout="40000"` would give a 40 second timeout.
|
||||
* __`timeout-message`__ (string): Message to output if the data provider times out. Specifying this will prevent the rendering from aborting.
|
||||
|
||||
## `<await-placeholder>`
|
||||
|
||||
This tag can be used to control what text is shown while an out-of-order async fragment is waiting to be loaded. Only applicable if `client-reorder` is set to `true`.
|
||||
This tag can be used to control what text is shown while an out-of-order await instance is waiting to be loaded. Only applicable if `client-reorder` is set to `true`.
|
||||
|
||||
Example:
|
||||
|
||||
@ -165,7 +165,7 @@ Example:
|
||||
|
||||
## `<await-reorderer>`
|
||||
|
||||
Container for all out-of-order async fragments. If any `<await>` tags have `client-reorder` set to true then this tag needs to be included in the page template (typically, right before the closing `</body>` tag).
|
||||
Container for all out-of-order await instances. If any `<await>` tags have `client-reorder` set to true then this tag needs to be included in the page template (typically, right before the closing `</body>` tag).
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user