takeRecords

Empties the record queue and returns what was in there.

MDN Reference