Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
revisiting old concepts

Ibrahim Tanyalcin IbrahimTanyalcin

🤠
revisiting old concepts
View GitHub Profile
@IbrahimTanyalcin
IbrahimTanyalcin / defPointAlongPath_fast_many.html
Created Sep 14, 2018
Performance comparsion of SVG point along path - fast version
View defPointAlongPath_fast_many.html
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<style>
path {
fill: none;
stroke: #000;
stroke-width: 3px;
}
@IbrahimTanyalcin
IbrahimTanyalcin / defPointAlongPath_many.html
Created Sep 14, 2018
Performance comparison of SVG point along path - default
View defPointAlongPath_many.html
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<style>
path {
fill: none;
stroke: #000;
stroke-width: 3px;
}
View B.js
!function(){
function X(exportA){
var div = document.body.lastElementChild.appendChild(document.createElement("div"));
div.textContent = "B\n\u21e9";
taskq.export({},"exportB");
}
X._taskqId = document.currentScript.dataset.taskqid;
X._taskqWaitFor = document.currentScript.dataset.taskqwaitfor.split(",").filter(d=>d);
taskq.push(X);
}()
View C.js
!function(){
function X(exportA,exportB){
var div = document.body.lastElementChild.appendChild(document.createElement("div"));
div.textContent = "C\n\u21e9";
taskq.export({},"exportC");
}
X._taskqId = document.currentScript.dataset.taskqid;
X._taskqWaitFor = document.currentScript.dataset.taskqwaitfor.split(",").filter(d=>d);
taskq.push(X);
}()
View A.js
!function(){
function X(){
var div = document.body.lastElementChild.appendChild(document.createElement("div"));
div.textContent = "A\n\u21e9";
taskq.export({},"exportA");
}
X._taskqId = document.currentScript.dataset.taskqid;
X._taskqWaitFor = document.currentScript.dataset.taskqwaitfor.split(",").filter(d=>d);
taskq.push(X);
}()
@IbrahimTanyalcin
IbrahimTanyalcin / minimal.html
Created Jul 15, 2018
minimal.html for declarative dependencies for Taskq.js
View minimal.html
<!DOCTYPE html>
<html lang="en" style="font-size:18px;">
<head>
<meta charset="utf-8">
<style>
body>div:nth-child(2)>div {
float:left;
width:60px;
heigth:60px;
box-sizing:border-box;
@IbrahimTanyalcin
IbrahimTanyalcin / someOtherProcess.js
Created Apr 18, 2018
Taskq -> Medium -> Part3 -> NonRenderBlocking -> someOtherProcess.js
View someOtherProcess.js
!function(){
function someOtherProcess(){
texts && texts.forEach(function(d,i){
var p = document.createElement("p");
p.textContent = d;
document.body.firstElementChild.appendChild(p);
});
}
someOtherProcess._taskqId = "someOtherProcess";
someOtherProcess._taskqWaitFor = ["nonRenderBlocking"];
@IbrahimTanyalcin
IbrahimTanyalcin / nonRenderBlocking.js
Created Apr 18, 2018
Taskq -> Medium -> Part3 -> NonRenderBlocking -> nonRenderBlocking.js
View nonRenderBlocking.js
!function(){
function nonRenderBlocking(){
taskq.load("./script0.js");
taskq.load("./script1.js");
taskq.load("./script2.js");
}
nonRenderBlocking._taskqId = "nonRenderBlocking";
taskq.push(nonRenderBlocking);
}();
@IbrahimTanyalcin
IbrahimTanyalcin / minimal.html
Created Apr 17, 2018
Taskq -> Medium -> Part3 -> NonRenderBlocking -> minimal.html
View minimal.html
<!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>
@IbrahimTanyalcin
IbrahimTanyalcin / script2.js
Created Apr 17, 2018
Taskq -> Medium -> Part3 -> renderBlocking -> script2.js
View script2.js
!function(){
texts.push("script2");
}()