Lock.lock() (Method)

Places a lock on the object.

Availability:

JavaScript - 1.2
Netscape Enterprise Server - 3.0
JavaScript syntax:NESmyLock.lock()

As you attempt to lock the object, the method first tests the Lock to see if another script already has a lock pending. If it does, then this method stalls and will not return until it can successfully place a lock on the object. That will happen when the previous locking script calls the unlock() method.

See also:Lock.isValid()