Add method onResourceRequested on pageProxy accepting two arguments.
fn - function evaluated for each "onResourceRequested" event in phantom context, which has access to networkRequest.abort();
callback - function evaluated for each "onResourceRequested" event in local context