mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb/IDB: Implement IDBIndex::get
This commit is contained in:
committed by
Jelle Raaijmakers
parent
73fa567e7a
commit
e74e571b56
Notes:
github-actions[bot]
2025-05-14 15:19:35 +00:00
Author: https://github.com/stelar7 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e74e571b561 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4727 Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/shannonbooth
@@ -76,4 +76,11 @@ void Index::clear_records()
|
||||
m_records.clear();
|
||||
}
|
||||
|
||||
Optional<IndexRecord&> Index::first_in_range(GC::Ref<IDBKeyRange> range)
|
||||
{
|
||||
return m_records.first_matching([&](auto const& record) {
|
||||
return range->is_in_range(record.key);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user