Creating a custom policy

jmarnold edited this page Jul 7, 2012 · 1 revision

Creating the policy

var myCustomPolicy = { matches: function(continuation) { return continuation.statusCode != 200; }, execute: function(continuation) { MyApplication.showError(); } }

Registering the policy

$.continuations.applyPolicy(myCustomPolicy)