Skip to content

Instantly share code, notes, and snippets.

@dfreedm
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dfreedm/676590eb4d5b07b94428 to your computer and use it in GitHub Desktop.
Save dfreedm/676590eb4d5b07b94428 to your computer and use it in GitHub Desktop.
Slotted Redistribution Question
<!-- Reference implementation for date-combo-box
Reference link: https://github.com/w3c/webcomponents/wiki/Proposal-for-changes-to-manage-Shadow-DOM-content-distribution/641b524e633678c2b25e7cb8ba31005350f36c9d#proposal-part-2-filling-and-re-exposing-named-insertion-points
-->
<!-- For date-combo-box, which inherits from combo-box -->
<template>
<input type="date" content-slot="inputElement">
<img src="calendarIcon.png" content-slot="icon">
<month-calendar content-slot="dropdown"></month-calendar>
</template>
<!-- instance -->
<date-range-combo-box>
<input type="date" content-slot="start">
<input type="date" content-slot="end">
</date-range-combo-box>
<!-- implementation -->
<template>
<shadow>
<date-combo-box>
<!--
How can input[content-slot="start"] end up in the <content slot="inputElement">
in the <date-combo-box> ?
-->
<content slot="start"></content>
</date-combo-box>
<date-combo-box>
<content slot="end"></content>
</date-combo-box>
</shadow>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment