Allow to handle the following DFrame events:
pre creation
post creation
pre show
post show
Example
var dFrame = new DFrame(parameters)
dFrame.onEvent = function (e) {
if (e.action == 'postCreate') {
dFrame.setTitle('document.html')
}
}
dFrame.setURL(url)
Demo
file: onEvent.html
Run the example
See the source code
dFrame.onEvent = function (event) {
… specific code …
}
event
Array.
event.action: String. The code of the event: 'preCreation', 'postCreation', 'preShow' or 'postShow'.
event.dFrame: The DFrame where the event happened.
event.cancelBubble: Originally set to false. If set to true the event does not bubbles anymore.
When 1 of the 4 handled events happends the onEvent function of the DFrame is launched, if created by the developper.
The event bubbles then to all parents of the DFrame, untill the top DFrame or the cancelBubble value of the event is set to true.