LibWeb/IDB: Implement IDBCursor::primary_key

This commit is contained in:
stelar7 2025-05-08 09:42:58 +02:00 committed by Sam Atkins
parent 141093e032
commit 8f876e824b
Notes: github-actions[bot] 2025-05-08 13:14:51 +00:00
3 changed files with 9 additions and 1 deletions

View file

@ -162,4 +162,11 @@ WebIDL::ExceptionOr<void> IDBCursor::continue_(JS::Value key)
});
}
// https://w3c.github.io/IndexedDB/#dom-idbcursor-primarykey
JS::Value IDBCursor::primary_key() const
{
// The primaryKey getter steps are to return the result of converting a key to a value with the cursors current effective key.
return convert_a_key_to_a_value(realm(), effective_key());
}
}