diff --git a/src/core/api.coffee b/src/core/api.coffee index b1bfa2f..faa7962 100644 --- a/src/core/api.coffee +++ b/src/core/api.coffee @@ -62,7 +62,8 @@ String.prototype.asUint8Array = () -> if not String.prototype.format String.prototype.format = () -> args = arguments - return new FormatedString(@, args) + return @replace /{(\d+)}/g, (match, number) -> + return if typeof args[number] != 'undefined' then args[number] else match String.prototype.f = () -> args = arguments diff --git a/src/core/tags/afx-html.tag b/src/core/tags/afx-html.tag index b5d4bd3..8f15866 100644 --- a/src/core/tags/afx-html.tag +++ b/src/core/tags/afx-html.tag @@ -14,7 +14,7 @@ } this.on("update", function(){ if(self.updateContent) - self.updateContent() + self.root.innerHTML = self.updateContent() }) \ No newline at end of file