Skip to content
Discussion options

You must be logged in to vote

Jeremy’s Inputs relies on the unsafe behavior of the html tagged template literal in notebooks. When you switch it to using Hypertext Literal, you get the invalid binding error because it’s using forms of interpolation that Hypertext Literal doesn’t support. Specifically it comes from this part:

<select name="input" ${multiple ? `multiple size="${size || options.length}"` : ""}>

In Hypertext Literal, you have to rewrite this as:

<select name="input" multiple=${multiple} size=${multiple ? size || options.length : undefined}>

As you also discovered, you’ll probably also need to strip the whitespace around the <form> element; otherwise Hypertext Literal will wrap the form element with a DIV …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by aaronkyle
Comment options

You must be logged in to vote
0 replies
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants