Created
April 22, 2014 20:24
-
-
Save AlexMocioi/11193038 to your computer and use it in GitHub Desktop.
Add callback function in dart to jquery UI component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CallbackFunction implements Function { | |
final Function f; | |
CallbackFunction(this.f); | |
call() => throw new StateError('There should always been at least 1 parameter' | |
'(js this).'); | |
noSuchMethod(Invocation invocation) { | |
Function.apply(f, []); | |
} | |
} | |
.callMethod("spinner", [new js.JsObject.jsify({ | |
"stop": new js.JsFunction.withThis(new CallbackFunction(recalc), | |
"page": 1, | |
"step": 0.1 | |
})]) | |
void recalc(){ | |
print("recalcing"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment