summaryrefslogtreecommitdiff
path: root/gdk/broadway/broadway.js
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-03-13 08:10:41 +0100
committerAlexander Larsson <alexl@redhat.com>2020-03-13 15:00:18 +0100
commita4b718da4ebf7854e91b2a4c6e833db44caa6aff (patch)
tree467da9abb81c5da24883d7e92f83014d058ab52a /gdk/broadway/broadway.js
parent086a577fd164db2b8530892b6b8eaabee98780b4 (diff)
downloadgtk+-a4b718da4ebf7854e91b2a4c6e833db44caa6aff.tar.gz
broadway: Fix image updates for firefox
For whatever reason we need to assign the function to a variable to be able to call it.
Diffstat (limited to 'gdk/broadway/broadway.js')
-rw-r--r--gdk/broadway/broadway.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index 793aa56bea..2478aacc7c 100644
--- a/gdk/broadway/broadway.js
+++ b/gdk/broadway/broadway.js
@@ -997,12 +997,13 @@ function handleDisplayCommands(display_commands)
case DISPLAY_OP_CHANGE_TEXTURE:
var image = cmd[1];
var texture = cmd[2];
- // We need a new closure here to have a separate copy of "template" for each iteration...
- function a_block(t) {
+ // We need a new closure here to have a separate copy of "texture" for each iteration in the onload callback...
+ var block = function(t) {
image.src = t.url;
// Unref blob url when loaded
image.onload = function() { t.unref(); };
- }(texture);
+ };
+ block(texture);
break;
case DISPLAY_OP_CHANGE_TRANSFORM:
var div = cmd[1];