From 73f2d052ed588f4b2c38e6638a51a293bf6cc13a Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 25 Sep 2017 23:11:21 +1000 Subject: [PATCH] Use CSS keyframes via sentinel-js instead of MutationObserver --- package.json | 3 ++- src/fengari-web.js | 17 ++++------------- yarn.lock | 4 ++++ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 8969e6d..7a5593b 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "license": "MIT", "dependencies": { "fengari": "fengari-lua/fengari", - "fengari-interop": "fengari-lua/fengari-interop" + "fengari-interop": "fengari-lua/fengari-interop", + "sentinel-js": "^0.0.4" }, "devDependencies": { "babel-core": "^6.26.0", diff --git a/src/fengari-web.js b/src/fengari-web.js index 217c723..aae9a87 100644 --- a/src/fengari-web.js +++ b/src/fengari-web.js @@ -5,6 +5,7 @@ const lua = fengari.lua; const lauxlib = fengari.lauxlib; const lualib = fengari.lualib; const interop = require('fengari-interop'); +const sentinel = require('sentinel-js'); const L = lauxlib.luaL_newstate(); @@ -143,22 +144,12 @@ const try_tag = function(tag) { } }; -/* watch for new script tags added to document */ -(new MutationObserver(function(records, observer) { - for (let i=0; i