mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Better handling of union types in IDL code generation
First check if a string is a member of the enum before attempting
numeric conversion. This generates correct code for fields like:
AudioContextOptions {
latencyHint: AudioContextLatencyCategory | double;
}
This commit is contained in:
committed by
Shannon Booth
parent
b69ec8757f
commit
4e48ba36bd
Notes:
github-actions[bot]
2026-02-06 11:05:11 +00:00
Author: https://github.com/jonbgamble Commit: https://github.com/LadybirdBrowser/ladybird/commit/4e48ba36bd4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7567 Reviewed-by: https://github.com/shannonbooth ✅
@@ -20,7 +20,7 @@ interface AudioContext : BaseAudioContext {
|
||||
};
|
||||
|
||||
dictionary AudioContextOptions {
|
||||
AudioContextLatencyCategory latencyHint = "interactive";
|
||||
(AudioContextLatencyCategory or double) latencyHint = "interactive";
|
||||
float sampleRate;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user