mirror of
https://github.com/servo/servo.git
synced 2025-07-25 08:10:21 +01:00
Support USVString as default value of a union argument
This commit is contained in:
parent
c5d6bb604d
commit
e905a4606a
3 changed files with 10 additions and 8 deletions
|
@ -732,6 +732,10 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
|
|||
default = "%s::Boolean(%s)" % (
|
||||
union_native_type(type),
|
||||
"true" if defaultValue.value else "false")
|
||||
elif tag is IDLType.Tags.usvstring:
|
||||
default = '%s::USVString(USVString("%s".to_owned()))' % (
|
||||
union_native_type(type),
|
||||
defaultValue.value)
|
||||
else:
|
||||
raise("We don't currently support default values that aren't null, boolean or default dictionary")
|
||||
elif dictionaries:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue