Skip to content

Commit

Permalink
Update notes about behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
cibernox committed Dec 23, 2017
1 parent 8b8e9a7 commit 7663a1c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions text/0000-promote-in-element-to-public-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ time to make it public.
# Detailed design

The existing API of `{{-in-element}}` is very simple and I do not suggest making any change to it.
It takes a DOM element as the only positional param and a block, and renders that block _inside_ the
given element instead of where it would normally go.

P.e.
* It takes a single positional param `destinationElement` that is a DOM element, and a block
* The given block is rendered not where it is located, but inside the given `destination` element.
* If `destinationElement` is false/null/undefined then it doesn't render anything but it doesn't error.
* If `destinationElement` changes the block is removed from the previous destination and added to the new one.

Example usage:

```hbs
{{#-in-element destinationElement}}
Expand Down

0 comments on commit 7663a1c

Please sign in to comment.