Skip to content

Conversation

exsurgo
Copy link

@exsurgo exsurgo commented Oct 11, 2020

Adding shadow DOM option.

  • Adding options parameter to allow for further enhancements
  • Adding options.shadow option, which creating and attaches shadow DOM, rather than light DOM
  • Adding additional docs for shadow DOM option.

@justinbmeyer
Copy link
Member

Awesome!

* @param {Object} options - Optional parameters
* @param {String?} options.shadow - Use shadow DOM rather than light DOM.
*/
export default function(ReactComponent, React, ReactDOM, options= {}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is options = {} valid in every browser that supports Proxy? If not, we might need to write this out "old school". I don't think we are currently transpiling this file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.
The only known* difference according to caniuse is Edge 12 and 13 supporting default function parameters and not supporting Proxy.
https://caniuse.com/mdn-javascript_functions_default_parameters
https://caniuse.com/proxy

| * (some browsers are listed in the source docs with unknown feature sets)

@cherifGsoul cherifGsoul mentioned this pull request Oct 13, 2020
@cherifGsoul
Copy link
Contributor

This closed for #9 , thank you @exsurgo !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants