mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 20:15:00 +00:00
LibWeb: Add id
field to Environment
This is a unique string that identifies the environment. We just use a simple incrementing number for now.
This commit is contained in:
parent
1f95943274
commit
62fed2a31d
2 changed files with 7 additions and 2 deletions
|
@ -43,9 +43,11 @@ void WindowEnvironmentSettingsObject::setup(AK::URL const& creation_url, Nonnull
|
|||
// FIXME: 1. Set settings object's id to reservedEnvironment's id,
|
||||
// target browsing context to reservedEnvironment's target browsing context,
|
||||
// and active service worker to reservedEnvironment's active service worker.
|
||||
settings_object->id = reserved_environment->id;
|
||||
settings_object->target_browsing_context = reserved_environment->target_browsing_context;
|
||||
|
||||
// FIXME: 2. Set reservedEnvironment's id to the empty string.
|
||||
// 2. Set reservedEnvironment's id to the empty string.
|
||||
reserved_environment->id = String::empty();
|
||||
}
|
||||
|
||||
// 5. Otherwise, ...
|
||||
|
@ -53,6 +55,8 @@ void WindowEnvironmentSettingsObject::setup(AK::URL const& creation_url, Nonnull
|
|||
// FIXME: ...set settings object's id to a new unique opaque string,
|
||||
// settings object's target browsing context to null,
|
||||
// and settings object's active service worker to null.
|
||||
static i64 next_id = 1;
|
||||
settings_object->id = String::number(next_id++);
|
||||
settings_object->target_browsing_context = nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue