Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/@ember/-internals/glimmer/lib/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,15 @@ export class Renderer extends BaseRenderer {
}

getBounds(component: View): {
parentElement: SimpleElement;
parentElement: SimpleNode;
firstNode: SimpleNode;
lastNode: SimpleNode;
} {
let bounds: Bounds | null = component[BOUNDS];

assert('object passed to getBounds must have the BOUNDS symbol as a property', bounds);

let parentElement = bounds.parentElement();
let parentElement = bounds.parentNode();
let firstNode = bounds.firstNode();
let lastNode = bounds.lastNode();

Expand Down
9 changes: 7 additions & 2 deletions packages/@ember/-internals/glimmer/lib/syntax/in-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@

`{{in-element}}` requires a single positional argument:

- `destinationElement` -- the DOM element to render into. It must exist at the time
of rendering.
- `destinationElement` -- the DOM element, `DocumentFragment`, or `ShadowRoot` to
render into. It must exist at the time of rendering.

When the destination is a `DocumentFragment`, appending the fragment to the DOM
moves its children into the new parent. Content rendered by `{{in-element}}`
follows that move: subsequent updates apply to the content in its new location,
and destroying the block removes the content from its new location.

It also supports an optional named argument:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import { clearElement } from '@glimmer/util';
import Serializer from '@simple-dom/serializer';
import voidMap from '@simple-dom/void-map';

export function toInnerHTML(parent: SimpleElement | SimpleDocumentFragment): string {
export function toInnerHTML(parent: SimpleNode): string {
const serializer = new Serializer(voidMap);
return serializer.serializeChildren(parent);
}

export function toOuterHTML(parent: SimpleElement | SimpleDocumentFragment): string {
export function toOuterHTML(parent: SimpleNode): string {
const serializer = new Serializer(voidMap);
return serializer.serialize(parent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './suites/entry-point';
export * from './suites/has-block';
export * from './suites/has-block-params';
export * from './suites/in-element';
export * from './suites/in-element-document-fragment';
export * from './suites/initial-render';
export * from './suites/scope';
export * from './suites/shadowing';
Expand Down
Loading
Loading