LibWeb/IDB: Implement recent spec changes

This commit is contained in:
stelar7 2025-05-06 11:36:11 +02:00 committed by Sam Atkins
commit 9d5f6108e4
Notes: github-actions[bot] 2025-05-06 12:31:37 +00:00
9 changed files with 71 additions and 56 deletions

View file

@ -101,19 +101,4 @@ JS::Value IDBIndex::key_path() const
});
}
// https://w3c.github.io/IndexedDB/#index-referenced-value
HTML::SerializationRecord IDBIndex::get_referenced_value(IndexRecord const& index_record) const
{
// Records in an index are said to have a referenced value.
// This is the value of the record in the indexs referenced object store which has a key equal to the indexs records value.
return m_index
->object_store()
->records()
.first_matching([&](auto const& store_record) {
return Key::equals(store_record.key, index_record.value);
})
.value()
.value;
}
}