Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add alert overloading, saved to displayedAlert on window.

  • Loading branch information...
commit 7868d4e1f3f75b1cd99d203cf6dedcee1b01375c 1 parent b838576
@omega authored
Showing with 6 additions and 2 deletions.
  1. +1 −1  lib/Startsiden/Test/JavaScript.pm
  2. +5 −1 share/startsiden-test.js
View
2  lib/Startsiden/Test/JavaScript.pm
@@ -2,7 +2,7 @@ package Startsiden::Test::JavaScript;
use strict;
use warnings;
use base qw(Test::Builder::Module);
-our $VERSION = '0.005';
+our $VERSION = '0.006';
my $CLASS = __PACKAGE__;
use Sub::Exporter -setup => {
View
6 share/startsiden-test.js
@@ -100,7 +100,7 @@ if (input) {
}
});
} else {
- console.log("OMG, no input, lets just run our script");
+ //console.log("OMG, no input, lets just run our script");
var bootstrap = setup(phantom);
bootstrap();
@@ -128,6 +128,10 @@ function setup(obj) {
window.diag = function(msg) {
console.log("# " + msg);
}
+ window.alert = function(msg) {
+ console.log("ALERT!" + msg);
+ window.displayedAlert = msg;
+ }
window.addListener = function(target, name, func) {
if (typeof target[name] === 'function') {
var orig = target[name];
Please sign in to comment.
Something went wrong with that request. Please try again.