mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
servoshell: Support runtime preference manipulation (#38159)
These changes add a custom servo:preferences URL that allows modifying selected preferences at runtime. The goal of this work is to make it easy to test pages while toggling experimental web platform features, and support quickly changing the User-Agent header. Testing: Manually verified that spacex.com loads correctly after changing the user agent, and that https://polygon.io/ displays grid elements correctly and no console errors with the experimental prefs enabled. Fixes: #35862 <img width="1136" height="880" alt="Screenshot 2025-07-18 at 1 06 23 AM" src="https://github.com/user-attachments/assets/2d27c321-6ca0-43c3-a347-7bc4b55272df" /> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
c97ec1b2fb
commit
6565d982bd
13 changed files with 308 additions and 25 deletions
|
@ -11,6 +11,13 @@
|
|||
Func="ServoInternals::is_servo_internal"]
|
||||
interface ServoInternals {
|
||||
Promise<object> reportMemory();
|
||||
|
||||
[Throws] USVString getStringPreference(USVString name);
|
||||
[Throws] long long getIntPreference(USVString name);
|
||||
[Throws] boolean getBoolPreference(USVString name);
|
||||
undefined setStringPreference(USVString name, USVString value);
|
||||
undefined setIntPreference(USVString name, long long value);
|
||||
undefined setBoolPreference(USVString name, boolean value);
|
||||
};
|
||||
|
||||
partial interface Navigator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue