Mark text property as special and set it with a string comming from builder.

This commit is contained in:
Nedyalko Nikolov
2016-07-19 14:37:10 +03:00
parent e4cf173e3f
commit a481fa9808
2 changed files with 15 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ function ensureVisualState() {
registerSpecialProperty("class", (instance: definition.View, propertyValue: string) => {
instance.className = propertyValue;
});
registerSpecialProperty("text", (instance, propertyValue) => {
instance.set("text", propertyValue);
});
function getEventOrGestureName(name: string): string {
return name.indexOf("on") === 0 ? name.substr(2, name.length - 2) : name;