@popeindustries/lit-html
Version:
Seamlessly and efficiently use @popeindustries/lit-html-server rendered HTML to hydrate lit-html templates in the browser
6 lines (5 loc) • 603 B
JavaScript
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/import{directive as i,PartType as s}from"../directive.js";import{AsyncReplaceDirective as c}from"./async-replace.js";import{clearPart as n,insertPart as a,setChildPartValue as p}from"../directive-helpers.js";class o extends c{constructor(e){if(super(e),e.type!==s.CHILD)throw new Error("asyncAppend can only be used in child expressions")}update(e,r){return this.__childPart=e,super.update(e,r)}commitValue(e,r){r===0&&n(this.__childPart);const t=a(this.__childPart);p(t,e)}}const m=i(o);export{m as asyncAppend};