Skip to content

Feat: add support for rendering named slots (#887) #915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ferm10n
Copy link

@ferm10n ferm10n commented Aug 10, 2018

No description provided.

Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance you can add a unit test? If not I might be able to do it. Didn't realize named slots wasn't supported.

@ferm10n
Copy link
Author

ferm10n commented Aug 21, 2018

I plan on it, just haven't had the time to focus on it yet. #887 was closed too so my PR might not be needed. I'll check tomorrow

@ferm10n
Copy link
Author

ferm10n commented Aug 21, 2018

So it looks like e604f1c fixes this. I like that solution a lot better than mine lol, so I'm closing.
However there seems to be some trouble when using following the example on https://vuejs.org/v2/guide/components-slots.html#Named-Slots, which uses the template element for named slots.

JSDOM does not serialize template contents, in accordance with the spec.

@eddyerburgh do you have any input on this, with regards to handling template elements?

@ferm10n ferm10n closed this Aug 21, 2018
@eddyerburgh
Copy link
Member

eddyerburgh commented Aug 21, 2018

Can you give me an example in code of the problem, and raise a new issue so I can track it

@ferm10n
Copy link
Author

ferm10n commented Aug 21, 2018

https://codesandbox.io/s/p4mmxj9mx (Learning how to use this tool, I didn't know how to pull in the latest version that is on the dev branch here)

I'm not entirely sure what should happen here to be honest, but I do imagine that it shouldn't be blank.

Here's the reason why you'd get <template></template>. I misspoke earlier, parse5 is the cause, which is used by JSDOM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants