mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Add FormData constructor
This commit is contained in:
parent
94df5d1cba
commit
73e67568c1
3 changed files with 17 additions and 7 deletions
|
@ -945,8 +945,10 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
|
||||
# Set up some sensible defaults for these things insofar as we can.
|
||||
holderType = None
|
||||
if argIsPointer:
|
||||
initialValue = None
|
||||
if argIsPointer or isOptional:
|
||||
declType = "Option<" + typePtr + ">"
|
||||
initialValue = "None"
|
||||
else:
|
||||
declType = typePtr
|
||||
|
||||
|
@ -995,7 +997,7 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
declType = CGGeneric(declType)
|
||||
if holderType is not None:
|
||||
holderType = CGGeneric(holderType)
|
||||
return (templateBody, declType, holderType, isOptional, None)
|
||||
return (templateBody, declType, holderType, isOptional, initialValue)
|
||||
|
||||
if type.isSpiderMonkeyInterface():
|
||||
assert not isEnforceRange and not isClamp
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* http://xhr.spec.whatwg.org
|
||||
*/
|
||||
|
||||
/*[Constructor(optional HTMLFormElement form)]*/
|
||||
[Constructor(optional HTMLFormElement form)]
|
||||
interface FormData {
|
||||
void append(DOMString name, Blob value, optional DOMString filename);
|
||||
void append(DOMString name, DOMString value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue