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
//Object DetectSubtleCrypto() | |
//Establish the availability of various crypto.subtle API's necessary for keygen, signing, verification, hashing | |
function DetectSubtleCrypto(){ | |
var supportedApis = {}; | |
var baselineSupport = ( | |
(crypto && crypto.subtle) | |
&& ( | |
(location.protocol === "https:" || "chrome-extension:" || "chrome:") | |
|| (location.hostname === "localhost" || location.hostname === "127.0.0.1") | |
) |
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
var proc = {} | |
module.exports = proc; | |
var msCh = new MessageChannel() | |
var queue = []; | |
msCh.port1.onmessage = function(ev) { | |
var source = ev.source; | |
if ( ev.data === 'proc-tick') { | |
if (queue.length > 0) { | |
var fn = queue.shift(); |
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 getEntryForRegisteredPrefix(name) { | |
for (var i = 0; i < NDN.CSTable.length; i++) { | |
console.log(NDN.CSTable[i], name); | |
var entry = new Name(NDN.CSTable[i].name); | |
var interestName = new Interest(entry); | |
if (interestName.matches_name(new Name(name)) == true){ | |
console.log('Match!!!', NDN.CSTable[i], name); | |
return NDN.CSTable[i]; | |
} | |
} |
NewerOlder