1. Let queue be the for origin and name.

    2. Add request to queue.

    3. Wait until all previous requests in queue have been processed.

    4. Let openConnections be the set of all associated with db.

    5. For each entry of openConnections that does not have its set to true, queue a task to named at entry with db’s and null.

      Firing this event might cause one or more of the other objects in openConnections to be closed, in which case the versionchange event is not fired at those objects, even if that hasn’t yet been done.

    6. Wait until all in openConnections are closed.

    7. Let version be db’s .