Stencil: Expose ShadowDOM properties

Created on 12 Jun 2019  路  3Comments  路  Source: ionic-team/stencil

Stencil version:

 @stencil/core@all

I'm submitting a:

[ ] bug report
[x ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

Actually, in stencil component, you are able to set

@Component({
  tag: 'todo-list',
  styleUrl: 'todo-list.css',
  shadow : true / false 
})

Expected behavior:

I should able to control the ShadowDOM properties, exposing the same API as WC's to set open or close and in future DelegateFocus etc ...

@Component({
  tag: 'todo-list',
  styleUrl: 'todo-list.css',
  shadow : { mode : 'closed'  delegatesFocus : true } 
enhancement

Most helpful comment

All 3 comments

It has been a challenge trying to implement accessible components with focus events. A lot of times, the element that needs to trigger the focus is inside of the shadow dom and not the host element. Exposing delegatesFocus will be very helpful.

cc @manucorporat @adamdbradley

Another good reason FIREFOX joined to

https://github.com/whatwg/html/pull/4796

PR still open https://github.com/ionic-team/stencil/pull/1190

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danschultz picture danschultz  路  3Comments

kensodemann picture kensodemann  路  3Comments

noahlaux picture noahlaux  路  3Comments

joewoodhouse picture joewoodhouse  路  3Comments

rajiramamoorthi picture rajiramamoorthi  路  3Comments