onbeforeunload.setQualifier(new JsNameRef(info, "window"));
JsNameRef handler =
jsProgram.getIndexedFunction("CoverageUtil.onBeforeUnload").getName().makeRef(info);
JsBinaryOperation assignment = new JsBinaryOperation(info, JsBinaryOperator.ASG,
onbeforeunload, handler);
jsProgram.getGlobalBlock().getStatements().add(assignment.makeStmt());
}
private void execImpl() {
SourceInfo info = jsProgram.createSourceInfoSynthetic(getClass());
addBeforeUnloadListener(info);