MCPcopy Create free account
hub / github.com/microsoft/SandDance / installOverrides

Function installOverrides

docs/app/js/sanddance-app.js:59061–59071  ·  view source on GitHub ↗
(gl, _ref)

Source from the content-addressed store, hash-verified

59059 }
59060}
59061function installOverrides(gl, _ref) {
59062 var target = _ref.target, target2 = _ref.target2;
59063 Object.keys((0, _polyfillTable.WEBGL2_CONTEXT_OVERRIDES)).forEach(function(key) {
59064 if (typeof (0, _polyfillTable.WEBGL2_CONTEXT_OVERRIDES)[key] === "function") {
59065 var originalFunc = gl[key] ? gl[key].bind(gl) : function() {};
59066 var polyfill = (0, _polyfillTable.WEBGL2_CONTEXT_OVERRIDES)[key].bind(null, gl, originalFunc);
59067 target[key] = polyfill;
59068 target2[key] = polyfill;
59069 }
59070 });
59071}
59072function installPolyfills(gl, polyfills) {
59073 var _iteratorNormalCompletion2 = true;
59074 var _didIteratorError2 = false;

Callers 1

polyfillContextFunction · 0.70

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected