Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b025014
Create index.html
AnirudhSinghTomar Jul 8, 2021
83e9767
Create resourceLEVEL1.txt
AnirudhSinghTomar Jul 8, 2021
8cce8be
Create index.html
AnirudhSinghTomar Jul 8, 2021
c65ffa4
Create script.js
AnirudhSinghTomar Jul 8, 2021
f277712
Create worker.js
AnirudhSinghTomar Jul 8, 2021
0889072
Create resourceLEVEL2.txt
AnirudhSinghTomar Jul 8, 2021
30056a2
Create index.html
AnirudhSinghTomar Jul 8, 2021
0a586c6
Update index.html
AnirudhSinghTomar Jul 8, 2021
83456e5
Delete index.html
AnirudhSinghTomar Jul 8, 2021
346b65d
Create index.html
AnirudhSinghTomar Jul 8, 2021
a6328c5
Create script.js
AnirudhSinghTomar Jul 8, 2021
48a9a35
Create resourceLEVEL3.txt
AnirudhSinghTomar Jul 8, 2021
43d1144
Create index.html
AnirudhSinghTomar Jul 8, 2021
efa3d69
Create resourceLEVEL1.txt
AnirudhSinghTomar Jul 8, 2021
db38011
Create index.html
AnirudhSinghTomar Jul 8, 2021
9b250a0
Create script.js
AnirudhSinghTomar Jul 8, 2021
8b106e9
Create worker.js
AnirudhSinghTomar Jul 8, 2021
b108c2a
Create resourceLEVEL2.txt
AnirudhSinghTomar Jul 8, 2021
460abad
Create index.html
AnirudhSinghTomar Jul 8, 2021
d435e10
Create script.js
AnirudhSinghTomar Jul 8, 2021
542ae67
Create resourceLEVEL3.txt
AnirudhSinghTomar Jul 8, 2021
4c19f61
Delete 06-dom_manipulation/LEVEL 01/AnirudhSinghTomar directory
AnirudhSinghTomar Jul 8, 2021
4b719d9
Delete 06-dom_manipulation/LEVEL 02/AnirudhSinghTomar directory
AnirudhSinghTomar Jul 8, 2021
12a74c1
Delete 06-dom_manipulation/LEVEL 03/AnirudhSInghTomar directory
AnirudhSinghTomar Jul 8, 2021
1a8a6e7
Create index.html
AnirudhSinghTomar Jul 8, 2021
bfc0369
Create script.js
AnirudhSinghTomar Jul 8, 2021
13dad79
Create worker.js
AnirudhSinghTomar Jul 8, 2021
bdbd8ef
Create resourceLEVEL2.txt
AnirudhSinghTomar Jul 8, 2021
bd073f9
Delete 06-dom_manipulation/LEVEL_2/AnirudhSinghTomar directory
AnirudhSinghTomar Jul 8, 2021
6da13c4
Update README.md
AnirudhSinghTomar Jul 19, 2021
e5a72bb
Update README.md
AnirudhSinghTomar Jul 19, 2021
3227608
Update README.md
AnirudhSinghTomar Jul 19, 2021
c54b698
Update README.md
AnirudhSinghTomar Jul 19, 2021
b844561
Update README.md
Anirudhapty Jul 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 02-react/04-redux-saga/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
- Navya: https://codesandbox.io/s/infallible-dhawan-1emux?file=/src/App.js
- Sumanth: https://codesandbox.io/s/optimistic-proskuriakova-jxqq5?file=/src/App.js
- Pooja: https://codesandbox.io/s/gracious-snyder-hls4f?file=/src/App.js
- Anirudh: https://codesandbox.io/s/holy-bird-0zwxy?file=/src/App.js
36 changes: 36 additions & 0 deletions 06-dom_manipulation/LEVEL_01/AnirudhSinghTomar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Task 1</title>
<style>
h2 {
color: maroon;
}
body {
background-color: pink;
font-size: 130%;
}
</style>
</head>
<body id="body of the page" class="body of the page class" >
<h1 id="Main Heading Task 1 " class ="Heading Task 1" >Task 1</h1>
<h2 id="SubHeading Paragraph 1 " class="Subheading Paragraph 1">Paragraph 1</h2>
<p id="Paragraph 1" >
<ul>
<li id="Unordered list:Session 1" class="Ul">Session 1</li>
<li id="Unordered list:Session 2" class="Ul">Session 2</li>
</ul>
</p>
<h2 id="SubHeading Paragraph 2" class="Paragraph">Paragraph 2</h2>
<p style="text-align: center;" id="Centered Text" class="text">I am centered!<br>
<button type="button" id="Button"class="Click on it">Click on it</button>
</p>
<script>
document.body.addEventListener("click",(call) =>{
console.log("Id = ", call.target.id);
console.log("Class=" ,call.target.className)
});
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
13 changes: 13 additions & 0 deletions 06-dom_manipulation/LEVEL_02/AnirudhSinghTomar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Task 2</title>
<script src="script.js" type="text/javascript"></script>
</head>
<body>
<input type="number" id="number1"/>
<input type="number" id="number2"/>
<button type="button" id="buttontype" onclick="addnumber()">Click to Add Numbers</button>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers

https://www.html5rocks.com/en/tutorials/workers/basics/
18 changes: 18 additions & 0 deletions 06-dom_manipulation/LEVEL_02/AnirudhSinghTomar/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
addnumber = () => {
let num1 = parseInt(document.getElementById("number1").value);
let num2 = parseInt(document.getElementById("number2").value);
if (window.Worker) {
let worker1 = new Worker("worker.js");
let message = {
toadd: {
number1: num1,
number2: num2
}
};
worker1.postMessage(message)

worker1.onmessage = function(e) {
console.log(e.data.result);
};
}
}
7 changes: 7 additions & 0 deletions 06-dom_manipulation/LEVEL_02/AnirudhSinghTomar/worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
this.onmessage = function(e) {
if (e.data.toadd !== undefined) {
this.postMessage({
result: e.data.toadd.number1 + e.data.toadd.number2
});
}
};
12 changes: 12 additions & 0 deletions 06-dom_manipulation/LEVEL_03/AnirudhSinghTomar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">

<title>Task 3</title>
</head>
<body id="body" >
<button type="button" onclick="addtagss()">Submit</button>
<script src="script.js" type="text/javascript"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
26 changes: 26 additions & 0 deletions 06-dom_manipulation/LEVEL_03/AnirudhSinghTomar/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const arr = ["p", "button", "li"];
const text = ["Hey this is Anirudh Singh Tomar", "Click to Know me", "By"];
function addtagss() {
let observer;
observer = new MutationObserver(mutated);
let config = {
childList: true,
};
observer.observe(document.body, config);

for (let i = 0; i < arr.length; i++) {
var node = document.createElement(arr[i]);
var textnode = document.createTextNode(text[i]);
node.appendChild(textnode);
var element = document.getElementById("body");
element.appendChild(node);
}
}
function mutated(mutationList) {
Array.prototype.forEach.call(mutationList, function (data) {
let newnodes = data.addedNodes;
Array.prototype.forEach.call(newnodes, function (newN) {
console.log("Added a new node", newN.tagName);
});
});
}