Fixed bug 3480 - minor update to NACL common.js
authorSam Lantinga <slouken@libsdl.org>
Sat, 05 Nov 2016 01:48:14 -0700
changeset 10578131cefc2d86d
parent 10577 eb503d320787
child 10579 03531deafb03
Fixed bug 3480 - minor update to NACL common.js

Sylvain

All latest official NACL examples have a slightly different 'common.js' file. It seems it has been updated in the meantime to fix a bug.
test/nacl/common.js
     1.1 --- a/test/nacl/common.js	Sat Nov 05 03:56:55 2016 -0400
     1.2 +++ b/test/nacl/common.js	Sat Nov 05 01:48:14 2016 -0700
     1.3 @@ -39,7 +39,7 @@
     1.4          mimetype = 'application/x-ppapi-release';
     1.5        else
     1.6          mimetype = 'application/x-ppapi-debug';
     1.7 -    } else if (tool == 'pnacl' && isRelease) {
     1.8 +    } else if (tool == 'pnacl') {
     1.9        mimetype = 'application/x-pnacl';
    1.10      }
    1.11      return mimetype;
    1.12 @@ -147,6 +147,11 @@
    1.13      var listenerDiv = document.getElementById('listener');
    1.14      listenerDiv.appendChild(moduleEl);
    1.15  
    1.16 +    // Request the offsetTop property to force a relayout. As of Apr 10, 2014
    1.17 +    // this is needed if the module is being loaded on a Chrome App's
    1.18 +    // background page (see crbug.com/350445).
    1.19 +    moduleEl.offsetTop;
    1.20 +
    1.21      // Host plugins don't send a moduleDidLoad message. We'll fake it here.
    1.22      var isHost = isHostToolchain(tool);
    1.23      if (isHost) {