Closed granicz closed 3 years ago
@Tarmil Can you take a look? Thanks!
I think that's because HTML is actually parsed weirdly by browsers (as a standard) when some forbidden nestings happen, such as in your case div
directly inside tbody
or tr
directly inside div
. There is some code that helps deal with it in sitelets, based on this article, but if your SPA page contains these combinations then there is nothing that WebSharper can do.
So what you need to do is remove the divs and move the ws-*
attributes around so that the final effect is the same but the structure looks like valid HTML, for example something like this:
<table>
<tbody ws-hole="CartItems" ws-children-template="CartItem">
<tr>
<td ...>
Or this:
<table>
<tbody>
<tr ws-replace="CartItems"></tr>
<tr ws-template="CartItem">
<td ...>
See https://gitter.im/intellifactory/websharper?at=5fee8364acd1e516f8c71ee7 for details
(only tested in SPAs with
Bind()
)