This constructor is used internally to create a Closure object containing the function associated with a target object.
The Closure() constructor is used in Netscape 4 to create an event-handler function that can be forced to run in a scope containing a target object.
document.myform.myButton.onclick =
new Closure(
function()
{
document.validated = false;
},
document.myform.myButton
);| Prev | Home | Next |
| Closure object | Up | Closure.__parent__ |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||