4 lines to rule them all

Image
Heres a visual representation of what your life looks like if you live above the statistical benchmark to the age of 80. Each square here represents one week at an average of 53 weeks per year To some this might seem morbid, but I find it fascinating, humbling. You see a box I see milestones; birth of a child. The passing of a loved one. Graduation. The first paycheck. Marriage. Happiness and sadness and everything in between all rolled into 4 lines connected together. I like to fill in each week as it passes, it serves the following purpose - acts as a reminder on how far I have to go, so I contemplate and reflect on mistakes to learn from them - helps in keeping my self aligned to my values and stick to my smaller seemingly mundane habits that will only benefit me in the long run (like staying active/ keeping relationships) - keeps me grounded on how much I do not know - a constant reminder on not to take small things too seriously as it will all eventually come to an end - lastl...

Inspecting hard-to-get elements in the DOM

Today I learned how to inspect hard-to-get elements in the DOM, you know, the ones that you open but close as soon as you try to inspect them. I used a simple CSS trick in the console

So what you basically do is that you go into the console, you set a delay timer and then run the debugger. Before the debugger starts you open the elements that e.g in my case it was a dropdown and then you wait for the debugger to pause your screen

The command is setTimeout(() => {debugger;},3000)

Whats happening here?

We are essentially
 A. running the debugger 
 B. Adding a wait timer before the debugger is launched, in this case of 3 seconds

Step 1. run command in console 
Step 2. open the view you want 
Step 3. wait for DOM to freeze and then inspect elements accordingly 

This just freezes the DOM essentially, it currently works for Chrome, it should also work on other browsers




#SWE #FE 

Comments

Popular posts from this blog

A Thousand Flames

Clear Warnings

Bi-pedal on M.M Alam