- From: Paul Kinlan <notifications@github.com>
- Date: Thu, 02 Jun 2016 03:38:40 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc:
- Message-ID: <w3c/webcomponents/issues/511@github.com>
I noticed that anchors are not in the list of elements that [can support attachShadowRoot](http://w3c.github.io/webcomponents/spec/shadow/#methods) and I was hoping that we could add them in. I didn't want to pollute https://github.com/w3c/webcomponents/issues/110 My current usage is a custom share button ([demo](https://output.jsbin.com/poqeqis/latest)) that I am creating (based on the fact that not all pages have a URL I am creating a component that allow the user to share the current URL). I am currently allowing the developer to upgrade any element on the page to replace with my custom widget and I am looking to be as progressive as possible. If JS, or Web Components aren't supported I specifically want to keep the default link to a sharing service that I define (Twitter for example) — For example viewing the [demo](https://output.jsbin.com/poqeqis/latest) in Current Chrome 51 will just render a link, in Chrome Canary (52+ I think) I would have a custom widget. Anchor rendering when no support for ShadowDOM: ![No Support for WC, shows a link](https://cloud.githubusercontent.com/assets/45510/15742266/bb87e2a0-28b5-11e6-98f4-ef691dedd251.png) If there is support for WC and Shadow DOM I would expect to be able to stamp in new structure and attach a new Shadow Root. Safari Tech Preview currently allows me to attachShadowRoot to an anchor - the appears to be not spec compliant, but works as I want it to. ![screen shot 2016-06-02 at 10 51 03 am](https://cloud.githubusercontent.com/assets/45510/15741732/eb05757c-28b2-11e6-9841-f94227d76ae9.png) Chrome (Canary) being compliant to the whitelist, doesn't work as I want. ![screen shot 2016-06-02 at 10 50 41 am](https://cloud.githubusercontent.com/assets/45510/15741081/e3202968-28af-11e6-80bb-dc84ef3303cc.png) I understand that by default an anchor isn't inert and has a default action when the user clicks it and I am not sure what to do in that case, in my head I would expect to implicitly preventDefault and manage everything myself. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/511
Received on Thursday, 2 June 2016 10:39:10 UTC