• We Code
  • We Design
  • We Develope
  • We Write
  • We Share


Monday, May 11, 2015

12 Interesting facts about front end Web technologies

1 . By typing this below you can use your browser window as text editor
data:text/html, <html contenteditable="">

2. By typing below you can quickly run your html without running html file
hay, I am html</h1>

3. By typing below in your browser console you can make page editable
4. In mordern browser if you define any element with some Id it create a JS global variable

 <div id="IAmaDiv"></div>
console.log(IAMaDiv); // <div id="IAmaDiv"></div>

5. You can pass multiple statement inside if statement without using curly braces

if (confirm("wanna see two alerts?"))
  alert("first"), alert("second");

6. If  you want to disable alert in a Html page ,you can type this in console

alert = console.log.bind(console);

7. If you wanna print an array in table form.You can use below in Chrome

var author = [{name: 'ashish', age: 24}, {name: 'Nautiyal', age: 23}];

8. console.log($0); returns the currently selected element in Chrome

9. monitorEvents(window,'click'); can monitor all the click event on page in google chrome

10. debug(debugThisFunction); will kick on debugger whenever control will execute debugThisFunction

11. Typing keys(window); in console will return an Array of global objects

12 . history.pushState({}, '', "changedurl"); by using this you can change your url bar in browser to something else


Post a Comment