Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

page lifecycle in javascript

Tags:

javascript

What is the page life cycle in javascript?
What are they? How do they work?

like image 884
zanhtet Avatar asked Dec 24 '10 03:12

zanhtet


People also ask

What is life cycle in JavaScript?

There are three different phases during lifecycle of an JavaScript event. Capturing Phase. Target Phase. Bubbling Phase.

What is page life cycle?

When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering.

What is the DOM event lifecycle of a Web page?

The lifecycle of an HTML page has three important events: DOMContentLoaded – the browser fully loaded HTML, and the DOM tree is built, but external resources like pictures <img> and stylesheets may not yet have loaded. load – not only HTML is loaded, but also all the external resources: images, styles etc.

How many phases are there in the life cycle of a browser event?

When an event is fired on an element that has parent elements (in this case, the <video> has the <div> as a parent), modern browsers run three different phases — the capturing phase, the target phase, and the bubbling phase.


1 Answers

There is bunch of information out here:

JavaScript: DOM load events, execution sequence, and $(document).ready()

Info on DOM and web page lifecycle

Javascript Execution order: http://javascript.about.com/od/hintsandtips/a/exeorder.htm

like image 85
Madhur Ahuja Avatar answered Nov 15 '22 04:11

Madhur Ahuja