This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| self.addEventListener('fetch', evt => { | |
| // Fallback for subresource requests or in browsers that do not | |
| // support navigation preload. | |
| if (evt.request.mode !== "navigate" || !evt.preloadResponse) | |
| return; | |
| evt.respondWith(async _ => { | |
| // Try to get the navigation preload response. | |
| let r = await evt.preloadResponse; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // nsILoadInfo.idl | |
| // | |
| interface nsILoadInfo | |
| { | |
| // CSP data that was parsed from the LoadInfo's channel. This is purely | |
| // for communicating the value back to the client that triggered the | |
| // load. This should only be set for non-subresource loads. This | |
| // should not be used for enforcing CSP on subresource loads. Instead | |
| // use GetClientInfo() and the CSP value there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <script> | |
| // self.bar === 'foobar' | |
| </script> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| self.skipWaiting(); | |
| addEventListener('fetch', evt => { | |
| evt.respondWith(async function() { | |
| try { | |
| let response = await fetch(evt.request); | |
| console.log(`==> SUCCESS for url:${evt.request.url} integity:${evt.request.integrity}`); | |
| return response; | |
| } catch(e) { | |
| console.log(`==> FAILURE for url:${evt.request.url} integity:${evt.request.integrity}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let headers = new Headers(); | |
| headers.append('X-Food', 'Candy Corn'); | |
| headers.append('X-Drink', 'Cider'); | |
| let request = new Request('/order.html'); | |
| autoHeaders.put(request, headers); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void | |
| AssertAndSuppressCleanupFunc(ErrorResult* aRv) | |
| { | |
| aRv->AssertReportedOrSuppressed(); | |
| aRv->SuppressException(); | |
| } | |
| template <typename CleanupFunc = AssertAndSuppressCleanupFunc> | |
| class ErrorResult | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy | |
| import scipy | |
| from scipy import stats | |
| def median_test(samples1, samples2): | |
| median = numpy.median(samples1 + samples2) | |
| below1, above1 = count_partition(samples1, median) | |
| below2, above2 = count_partition(samples2, median) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ./b2g/chrome/content/shell.js: for (let crashid of pending) { | |
| ./b2g/chrome/content/dbg-browser-actors.js: for (let [browser, actor] of this._actorByBrowser) { | |
| ./js/examples/jorendb.js: for (var cmd of commandArray) { | |
| ./js/src/devtools/rootAnalysis/CFG.js: for (var xbody of functionBodies) { | |
| ./js/src/devtools/rootAnalysis/CFG.js: for (var edge of body.PEdge) { | |
| ./js/src/devtools/rootAnalysis/CFG.js: for (var edge of body.PEdge) { | |
| ./js/src/devtools/rootAnalysis/CFG.js: for (var e of predecessors[edge.Index[0]]) | |
| ./js/src/devtools/rootAnalysis/CFG.js: for (var nedge of successors[point]) { | |
| ./js/src/devtools/rootAnalysis/computeCallgraph.js: for (var entry of index[name]) { | |
| ./js/src/devtools/rootAnalysis/computeCallgraph.js: for (var field of csu.FunctionField) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function onClickHandler(evt) { | |
| var target = evt.target; | |
| var dataset = target.dataset || {}; | |
| var parentDataset = target.parentNode ? | |
| (target.parentNode.dataset || {}) : {}; | |
| var uuid = dataset.uuid; | |
| var node = target; | |
| if (!uuid) { | |
| uuid = parentDataset.uuid; | |
| node = target.parentNode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ids being exported by a timer loop | |
| var exporting = []; | |
| var gotSomeIds = function(ids) { | |
| if (!ids) { | |
| // selection done... we can finalize export | |
| } | |
| Array.prototype.push.apply(exporting, ids); | |
| }; |
NewerOlder