Skip to content

Commit

Permalink
Update single-spa-html docs to reflect promise support (#377)
Browse files Browse the repository at this point in the history
Reflect support for the single-spa-html template function returning a promise.

single-spa/single-spa-html#15
  • Loading branch information
thantos committed Dec 4, 2020
1 parent e4138c4 commit 55b3c29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ singleSpa.registerApplication({

## API / Options
single-spa-html is called with an object that has the following properties:
- `template` (required): An HTML string or a function that returns a string. The function will be called with the single-spa custom props. The returned string is injected into the DOM during the single-spa mount lifecycle.
- `template` (required): An HTML string or a function that returns a string or promise that resolves a string. The function will be called with the single-spa custom props. The returned string is injected into the DOM during the single-spa mount lifecycle.
- `domElementGetter` (optional): A function that is given the single-spa props and returns the dom element container into which the HTML will be injected. If omitted,
a default implementation is provided that wraps the template in a `<div>` that is appended to `document.body`.

0 comments on commit 55b3c29

Please sign in to comment.