Skip to content

Commit

Permalink
Merge pull request #49 from mbland/handlebars-plugin-return-doc-frag
Browse files Browse the repository at this point in the history
Return DocumentFragment from Handlebars plugin
  • Loading branch information
mbland committed Dec 16, 2023
2 parents cfef479 + c322b1d commit 2b86a65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion strcalc/src/main/frontend/components/placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class Placeholder {
* @param {Document} document - a Document or DocumentFragment
*/
static init(window, document) {
document.querySelector('#app').append(...Template({
document.querySelector('#app').appendChild(Template({
message: 'Hello, World!',
url: 'https://en.wikipedia.org/wiki/%22Hello,_World!%22_program'
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class PluginImpl {
'export default (rawTemplate) => ((context, options) => {',
' const t = document.createElement(\'template\')',
' t.innerHTML = rawTemplate(context, options)',
' return t.content.children',
' return t.content',
'})'
].join('\n')
}
Expand Down

0 comments on commit 2b86a65

Please sign in to comment.