This file contains 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(){ | |
function nonRenderBlocking(){ | |
taskq.load("./script0.js"); | |
taskq.load("./script1.js"); | |
taskq.load("./script2.js"); | |
} | |
nonRenderBlocking._taskqId = "nonRenderBlocking"; | |
taskq.push(nonRenderBlocking); | |
}(); |
This file contains 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 lang="en" style="font-size:24px;"> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
</style> | |
</head> | |
<body> | |
<div class="row" style="text-align:center;padding:100px;font-size:1rem;line-height:200%;font-family:Helvetica,Arial;color:DimGray"></div> | |
<script type="text/javascript" src="../../../taskq.js" charset="UTF-8"></script> |
This file contains 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(){ | |
texts.push("script2"); | |
}() |
This file contains 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(){ | |
texts.push("script1"); | |
}() |
This file contains 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(){ | |
texts = []; | |
texts.push("script0"); | |
}() |
This file contains 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 lang="en" style="font-size:24px;"> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
</style> | |
<script type="text/javascript" src="./script0.js" charset="UTF-8"></script> | |
<script type="text/javascript" src="./script1.js" charset="UTF-8"></script> | |
<script type="text/javascript" src="./script2.js" charset="UTF-8"></script> | |
</head> |
This file contains 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 obj = {value:3,stop:false}, //assing your value to obj.value every sec etc. | |
values = [], //array to store values | |
freq = 500, //frequency of check | |
result = undefined; //the result of average in the end | |
function checker(t){ //the function to periodically check | |
checker.startTime = checker.startTime || t; | |
if(obj.stop){ //if you set obj.stop to true, you will terminate the check | |
/*in the end calculate the result | |
if you want, store the a.length somewhere else |
This file contains 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
html { | |
font-size:16px; | |
font-family:Helvetica, Arial, "sans-serif"; | |
color:DimGray; | |
cursor:pointer; | |
} | |
html * { | |
box-sizing:border-box; | |
-webkit-user-select: none; | |
-moz-user-select: none; |
This file contains 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 lang="en" style="font-size:24px;"> | |
<head> | |
<meta charset="utf-8"> | |
<script type="text/javascript" src="../../taskq.js" charset="UTF-8"></script> | |
<script type="text/javascript" src="./index.js" charset="UTF-8" async></script> | |
</head> | |
<body> | |
<div class="row"> | |
</div> |