webcomponents / webcomponents.org

Home of the web components community
https://www.webcomponents.org
Apache License 2.0
359 stars 95 forks source link

Suggestion: Example at each API Reference, for quick copy/paste #890

Closed mrsideshowjack closed 5 days ago

mrsideshowjack commented 7 years ago

Origin page

Underneath each property there could be a example of the property in use inside the element. On click it would add the example to your clipboard, so you can paste it quickly into your element. for example:

debounceDuration
debounce-duration="300" 

image shows better example:

Currently you can highlight the property name and copy it from there, but this is tricky to do as its a link and for some reason it highlights backwards. Then after pasting it you have to change it from camelCasae to lowwer-case-dash which is tedious.

Personally I would have great use for a feature like this as I copy and paste API properties a lot from the reference.

madeleineostoja commented 7 years ago

Not all WCs serialize all properties to attributes, so this would be making an assumption on behalf of the web component author