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.
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]"
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?
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). https://github.com/canjs/can-stache/blob/b530682034cf1e59285046df5475b57ce5e5b0b1/src/mustache_core.js#L291 "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:
Thank you for your time! //James