chiark / gitweb /
js test: rename test_update_hook from gen_update_hook
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 21 Jul 2021 19:41:36 +0000 (20:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 21 Jul 2021 20:14:11 +0000 (21:14 +0100)
We're going to use it for something else too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts
wdriver/wdriver.rs

index 1a069962a3165285dad7b9efc65285cee86b789f..65c7511bdbf2e36c81d4e252800797fbb04dc1cd 100644 (file)
@@ -128,7 +128,7 @@ var keyops_local : { [opname: string]: (uo: UoRecord) => void } = Object();
 var last_log_ts: wasm_bindgen.TimestampAbbreviator;
 var last_zoom_factor : number = 1.0;
 var firefox_bug_zoom_factor_compensation : number = 1.0;
-var gen_update_hook : () => void;
+var test_update_hook : () => void;
 
 var svg_ns : string;
 var space : SVGGraphicsElement;
@@ -2144,8 +2144,8 @@ function startup() {
     redisplay_ancillaries(piece,p);
   }
 
-  if (gen_update_hook == null) gen_update_hook = function() { };
-  gen_update_hook();
+  if (test_update_hook == null) test_update_hook = function() { };
+  test_update_hook();
 
   last_log_ts = wasm_bindgen.timestamp_abbreviator(dataload.last_log_ts);
 
@@ -2167,7 +2167,7 @@ function startup() {
        messages[k](m[k]);
       }
       gen = tgen;
-      gen_update_hook();
+      test_update_hook();
     } catch (exc) {
       var s = exc.toString();
       string_report_error('exception handling update '
index 16c9f47e8efb29d568aadaddd51923116b4e96f3..ee2d619f55d67c1b7022f6464625186ce35bae46 100644 (file)
@@ -666,8 +666,8 @@ impl<'g> WindowGuard<'g> {
           ]).subst(r#"
             var done = arguments[0];
             if (gen >= @wanted@) { done(gen); return; }
-            window.gen_update_hook = function() {
-              window.gen_update_hook = function() { };
+            window.test_update_hook = function() {
+              window.test_update_hook = function() { };
               done(gen);
             };
           "#)?