-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdom.js
25 lines (15 loc) · 956 Bytes
/
dom.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// dom is DATA OBJECT MODEL. Every tag is visualised as trees of tags
// implementing finding elements in a document
var hello = document.getElementsByTagName('h1')
console.log(hello);
/*
=> this is not possible to do. Interesting fact is that:
> Node is a server side language and so it has nothing to do with the DOM manipulation or implementation of anythingy
> so the query selectors / hunting for elements doesn't work on the server side hence node does not support document. < anything >
*/
/*
var elem = window.getComputedStyle()
=> You can use window.getComputedStyle() of any thing. It returns the object of all the applied styles and everything about the object which is applying on that element.
=> So, we will easily be able to change anything or find the details of anything with precision.
=> Similarly, there is another function called elem.getPropertyValue() to access the specific property
*/