blackberry-webworks/BBX-Framework — comment on commit 20ca65eabc24357318d7369cf2df956db8ef6ff2
File: lib/framework.js line 56
By gtanner:

I just noticed this API. Should this not be:

webview.onRequest = function () { }

Passing in a function as an arg to a method brings up a few odd assumptions:

- I can have multiple callbacks:

webview.onRequest(one);
webview.onRequest(two);
....
- It isn't clear how to remove the callback, I would hope that passing in null or a falsy value would clear it.

Since the spec / requirements state that we can only ever have one callback, this is very unclear and should be rewritten to just be a property assignment.