Comparing version 4.3.0 to 4.4.0
@@ -139,3 +139,3 @@ import { render, directive } from 'https://unpkg.com/lit-html@^1.0.0/lit-html.js'; | ||
function component(renderer, BaseElement = HTMLElement, options = {useShadowDOM: true}) { | ||
function component(renderer, BaseElement = HTMLElement, {useShadowDOM = true, shadowRootInit = {}} = {}) { | ||
class Element extends BaseElement { | ||
@@ -148,6 +148,6 @@ static get observedAttributes() { | ||
super(); | ||
if (options.useShadowDOM === false) { | ||
if (useShadowDOM === false) { | ||
this._container = new Container(renderer, this); | ||
} else { | ||
this.attachShadow({ mode: 'open' }); | ||
this.attachShadow({ mode: "open", ...shadowRootInit}); | ||
this._container = new Container(renderer, this.shadowRoot, this); | ||
@@ -154,0 +154,0 @@ } |
@@ -5,3 +5,7 @@ import { html, render, TemplateResult } from 'lit-html'; | ||
export function component(renderer: (el: HTMLElement) => TemplateResult, BaseElement?: Function, options?: { | ||
useShadowDOM: boolean | ||
useShadowDOM: boolean, | ||
shadowRootInit?: { | ||
mode?: string | ||
delegatesFocus?: boolean, | ||
} | ||
}): Function; | ||
@@ -8,0 +12,0 @@ |
@@ -139,3 +139,3 @@ import { render, directive } from 'lit-html'; | ||
function component(renderer, BaseElement = HTMLElement, options = {useShadowDOM: true}) { | ||
function component(renderer, BaseElement = HTMLElement, {useShadowDOM = true, shadowRootInit = {}} = {}) { | ||
class Element extends BaseElement { | ||
@@ -148,6 +148,6 @@ static get observedAttributes() { | ||
super(); | ||
if (options.useShadowDOM === false) { | ||
if (useShadowDOM === false) { | ||
this._container = new Container(renderer, this); | ||
} else { | ||
this.attachShadow({ mode: 'open' }); | ||
this.attachShadow({ mode: "open", ...shadowRootInit}); | ||
this._container = new Container(renderer, this.shadowRoot, this); | ||
@@ -154,0 +154,0 @@ } |
{ | ||
"name": "haunted", | ||
"version": "4.3.0", | ||
"version": "4.4.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -139,3 +139,3 @@ import { render, directive } from '../lit-html/lit-html.js'; | ||
function component(renderer, BaseElement = HTMLElement, options = {useShadowDOM: true}) { | ||
function component(renderer, BaseElement = HTMLElement, {useShadowDOM = true, shadowRootInit = {}} = {}) { | ||
class Element extends BaseElement { | ||
@@ -148,6 +148,6 @@ static get observedAttributes() { | ||
super(); | ||
if (options.useShadowDOM === false) { | ||
if (useShadowDOM === false) { | ||
this._container = new Container(renderer, this); | ||
} else { | ||
this.attachShadow({ mode: 'open' }); | ||
this.attachShadow({ mode: "open", ...shadowRootInit}); | ||
this._container = new Container(renderer, this.shadowRoot, this); | ||
@@ -154,0 +154,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48627
1327