-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I understand this may be marked as "won't fix" or at least probably isn't a priority since there are ways to work around it and most wouldn't ever need it. I took a few swings at fixing it but didn't get far in the time I have.
How often can you reproduce it?
- Always
- Sometimes
- Rarely
- Unable
- I didn’t try
Description:
Named partials (technically section renderer) produce document fragments even when stringOnly is true in the section its being rendered in (in a style tag, for example).
can-stache/src/mustache_core.js
Line 291 in b530682
"res" is a documentFragment at that line when a named partial is rendered inside of style tag.
The text representation should be rendered instead.
Steps to reproduce:
https://codepen.io/anon/pen/eqRVZG?&editable=true&editors=0011
Expected results:
contents of style tag should be the raw text produced by the render. (Note: "innerHTML" of the fragment produced would be incorrect in the browser because it escapes things like ">" automatically)
Actual results:
contents of the style tag is "[object DocumentFragment]"
Environment:
Software | Version |
---|---|
can-stache version | latest |
Browser | chrome |
Operating system | windows 10 |
Thank you for your time!
//James