@ribajs/core
Advanced tools
Comparing version 0.16.12 to 0.16.13
{ | ||
"name": "@ribajs/core", | ||
"description": "Core module of Riba.js", | ||
"version": "0.16.12", | ||
"version": "0.16.13", | ||
"author": "Pascal Garber <pascal@jumplink.eu>", | ||
@@ -6,0 +6,0 @@ "private": false, |
@@ -180,3 +180,3 @@ import { IOptionsParam, IViewOptions } from '../riba'; | ||
const innerHTML = this.component.template.call(this); | ||
const innerHTML = this.component.template.call(this, this.el); | ||
// if innerHTML is null this component uses the innerHTML which he already has! | ||
@@ -191,3 +191,3 @@ if (innerHTML !== null) { | ||
const scope = this.component.initialize.call(this, this.el, this.locals()); | ||
this.view = new View(Array.prototype.slice.call(this.el.childNodes), scope, this.getMergedOptions()); | ||
this.view = new View(Array.prototype.slice.call(this.el.childNodes) as unknown as NodeListOf<ChildNode>, scope, this.getMergedOptions()); | ||
this.view.bind(); | ||
@@ -194,0 +194,0 @@ |
@@ -170,4 +170,4 @@ /** | ||
// IMPORTANT this must be a function and not a Arrow Functions | ||
return function(this: EventHandler, context: Binding, ev: Event, binding: Binding, el: HTMLElement) { | ||
this.call(self, ev, binding.view.models, el, context); | ||
return function(this: EventHandler, context: Binding, event: Event, binding: Binding, el: HTMLElement) { | ||
this.call(self, context, event, binding.view.models, el); | ||
}; | ||
@@ -354,3 +354,3 @@ } | ||
this.view = new View(Array.prototype.slice.call(this.el.childNodes), this.scope, viewOptions); | ||
this.view = new View(Array.prototype.slice.call(this.el.childNodes) as unknown as NodeListOf<ChildNode>, this.scope, viewOptions); | ||
this._bound = true; | ||
@@ -357,0 +357,0 @@ this.scope = this.view.models; |
@@ -12,3 +12,3 @@ import Debug from 'debug'; | ||
/** If the template function returns null no template is injected */ | ||
template: (() => string | null) | (() => HTMLElement); | ||
template: ((el: HTMLElement) => string | null); | ||
initialize: (el: HTMLElement, data: ValueType) => Scope; | ||
@@ -15,0 +15,0 @@ |
@@ -69,3 +69,3 @@ import { IViewOptions, Riba } from './riba'; | ||
*/ | ||
constructor(els: HTMLCollection | HTMLElement | Node, models: any, options: IViewOptions) { | ||
constructor(els: HTMLCollection | HTMLElement | Node | NodeListOf<ChildNode>, models: any, options: IViewOptions) { | ||
if (els instanceof Array) { | ||
@@ -72,0 +72,0 @@ this.els = els; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
2780492
99
1
2
1
12