Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incompatible FormData constructor between W3C specs #225

Closed
vvakame opened this issue Jul 24, 2014 · 4 comments · Fixed by #337
Closed

Incompatible FormData constructor between W3C specs #225

vvakame opened this issue Jul 24, 2014 · 4 comments · Fixed by #337
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@vvakame
Copy link
Contributor

vvakame commented Jul 24, 2014

in master/HEAD (64ab02e)
https://github.com/Microsoft/TypeScript/blob/214df64e287804577afa1fea0184c18c40f7d1ca/src/lib/dom.generated.d.ts#L10204

declare var FormData: {
    prototype: FormData;
    new(): FormData;
}

in W3C
http://www.w3.org/TR/XMLHttpRequest2/#interface-formdata

[Constructor,
 Constructor(HTMLFormElement form)]
interface FormData {
  void append(DOMString name, Blob value, optional DOMString filename);
  void append(DOMString name, DOMString value);
};

in TypeScript 1.0.1 (I think this is valid!
https://typescript.codeplex.com/SourceControl/latest#typings/lib.d.ts

declare var FormData: {
    prototype: FormData;
    new (form?: HTMLFormElement): FormData;
}
@sophiajt sophiajt added this to the TypeScript 1.1 milestone Jul 28, 2014
@mhegazy
Copy link
Contributor

mhegazy commented Jul 30, 2014

These files are auto generated from the IE DOM specification. hand editing it causes things to be dropped like FormData. I would rather keep it auto generated, and get this fixed with IE's next update.

@RyanCavanaugh
Copy link
Member

IE supports this parameter already (see network activity here http://jsfiddle.net/2aXLs/) and this constructor is used in the wild https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects

Seems like the IE DOM spec might off here; we shouldn't just propagate that error.

@styfle
Copy link
Contributor

styfle commented Jul 30, 2014

Seems like the IE DOM spec might off here; we shouldn't just propagate that error.

👍 Agreed

@vvakame
Copy link
Contributor Author

vvakame commented Jul 31, 2014

Seems like the IE DOM spec might off here; we shouldn't just propagate that error.

👍

this problem can't solved user land. this issue broken my real project.
If this problem will close without fix, we need #182.

mhegazy added a commit that referenced this issue Aug 2, 2014
@mhegazy mhegazy added the Fixed label Aug 2, 2014
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants