Skip to content
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

Suggestion - Allow "<slot>" to provide options for select or datalist #7560

Open
jogibear9988 opened this issue Jan 31, 2022 · 1 comment
Open
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: shadow Relates to shadow trees (as defined in DOM)

Comments

@jogibear9988
Copy link

For example, I'd like to have a customElement wich is called like this:

  <a-a>
    <option>LL</option>
    <option>MM</option>
  </a-a>

And it should be possible that it renders the options for example in a select:

class AA extends HTMLElement
{
  constructor() {
    super();
    let shadow = this.attachShadow({mode: 'open'});

    let sel = document.createElement('select');
    let sl = document.createElement('slot');
    sel.appendChild(sl);
    
    shadow.appendChild(sel);
    
  }
  
}

customElements.define("a-a", AA)
@jogibear9988
Copy link
Author

@annevk annevk added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: shadow Relates to shadow trees (as defined in DOM) labels Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: shadow Relates to shadow trees (as defined in DOM)
Development

No branches or pull requests

2 participants