alit-element
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -21,3 +21,2 @@ import 'reflect-metadata'; | ||
}; | ||
private _$; | ||
/** | ||
@@ -24,0 +23,0 @@ * Get element with specified ID in the element's shadow root |
@@ -6,6 +6,2 @@ import 'reflect-metadata'; | ||
export class AlitElement extends LitElement { | ||
constructor() { | ||
super(...arguments); | ||
this._$ = {}; | ||
} | ||
static get __listeners() { return []; } | ||
@@ -18,9 +14,3 @@ static get __observers() { return {}; } | ||
$(id) { | ||
if (!this._$[id]) { | ||
const e = this.shadowRoot.querySelector(`#${id}`); | ||
if (e) { | ||
this._$[id] = e; | ||
} | ||
} | ||
return this._$[id]; | ||
return this.shadowRoot.querySelector(`#${id}`); | ||
} | ||
@@ -27,0 +17,0 @@ /** |
{ | ||
"name": "alit-element", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A simple wrapper for lit-element with some enhanced functions", | ||
@@ -29,7 +29,7 @@ "main": "dist/alit-element.js", | ||
"devDependencies": { | ||
"@webcomponents/webcomponentsjs": "^2.1.1", | ||
"@webcomponents/webcomponentsjs": "^2.1.3", | ||
"reflect-metadata": "^0.1.12", | ||
"tslint": "^5.11.0", | ||
"typescript": "^2.9.2" | ||
"typescript": "^3.1.1" | ||
} | ||
} |
@@ -23,3 +23,2 @@ import 'reflect-metadata'; | ||
static get __observers(): { [name: string]: ObserveHandler[] } { return {}; } | ||
private _$: { [id: string]: HTMLElement } = {}; | ||
@@ -31,9 +30,3 @@ /** | ||
$(id: string): HTMLElement { | ||
if (!this._$[id]) { | ||
const e = this.shadowRoot!.querySelector(`#${id}`) as HTMLElement; | ||
if (e) { | ||
this._$[id] = e; | ||
} | ||
} | ||
return this._$[id]; | ||
return this.shadowRoot!.querySelector(`#${id}`) as HTMLElement; | ||
} | ||
@@ -40,0 +33,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
31652
789