@atomico/base-element
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -76,2 +76,5 @@ /** | ||
break; | ||
case Function: | ||
value = window[value]; | ||
break; | ||
} | ||
@@ -85,3 +88,3 @@ } | ||
} else { | ||
throw `the attribute [${name}] must be of the type [${type.name}]`; | ||
throw `the observable [${name}] must be of the type [${type.name}]`; | ||
} | ||
@@ -88,0 +91,0 @@ } |
@@ -82,2 +82,5 @@ (function (global, factory) { | ||
break; | ||
case Function: | ||
value = window[value]; | ||
break; | ||
} | ||
@@ -91,3 +94,3 @@ } | ||
} else { | ||
throw `the attribute [${name}] must be of the type [${type.name}]`; | ||
throw `the observable [${name}] must be of the type [${type.name}]`; | ||
} | ||
@@ -94,0 +97,0 @@ } |
{ | ||
"name": "@atomico/base-element", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/atomico-base-element.js", |
@@ -76,2 +76,5 @@ /** | ||
break; | ||
case Function: | ||
value = window[value]; | ||
break; | ||
} | ||
@@ -85,3 +88,3 @@ } | ||
} else { | ||
throw `the attribute [${name}] must be of the type [${type.name}]`; | ||
throw `the observable [${name}] must be of the type [${type.name}]`; | ||
} | ||
@@ -88,0 +91,0 @@ } |
@@ -9,3 +9,4 @@ import Element from "../src/index"; | ||
fieldObject: Object, | ||
fieldArray: Array | ||
fieldArray: Array, | ||
fieldFunction: Function | ||
}; | ||
@@ -77,2 +78,17 @@ update(props) { | ||
}); | ||
it("Test field type Function", async done => { | ||
window.globalHandler = function() { | ||
this.done(); | ||
}; | ||
let node = scope( | ||
`<custom-element field-function='globalHandler'></custom-element>` | ||
); | ||
await node.mounted; | ||
node.fieldFunction.call({ done }); | ||
done(); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
202480
447