-
Notifications
You must be signed in to change notification settings - Fork 440
Change FileReader.readAsText‘s 2nd argument name #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I would add the widl file instead. the widl file comes from https://w3c.github.io/FileAPI/#FileReader-interface, to add it see #523 (comment) for more details. |
@mhegazy The This could come down to subjective opinion because the W3C chose the name
I strongly side with MDN’s documentation choice for the parameter name. My reasoning is that if |
I also forgot to mention, that the parameter was originally named |
The name is coming from the spec: https://www.w3.org/TR/FileAPI/#FileReaderSync It is also in https://w3c.github.io/FileAPI/#APIASynch. So looks like a spec bug. @saschanaz which one of the two specs should we be using: https://w3c.github.io/FileAPI/#APIASynch seems to be more up-to-date. |
The first one is a snapshot and the second one is a nightly version. The latter may frequently go back and forth so I've chosen the former. |
FYI, you can file an issue for this here: https://github.com/w3c/FileAPI/issues/ |
Thank you @saschanaz, I've filed such an issue here: w3c/FileAPI#105 |
The change to the spec is now live: https://w3c.github.io/FileAPI/#idl-index @mhegazy I'm unable to fetch the updated WIDL due to an error in the |
|
(I had made another comment here but disregard that since I had the wrong commit checked out, sorry.) I've run diff --git a/inputfiles/idl/WebGL 1.widl b/inputfiles/idl/WebGL 1.widl
index 4c5f92b..a6df3de 100644
--- a/inputfiles/idl/WebGL 1.widl
+++ b/inputfiles/idl/WebGL 1.widl
@@ -56,36 +56,46 @@ dictionary WebGLContextAttributes {
GLboolean failIfMajorPerformanceCaveat = false;
};
+[Exposed=(Window,Worker)]
interface WebGLObject {
};
+[Exposed=(Window,Worker)]
interface WebGLBuffer : WebGLObject {
};
+[Exposed=(Window,Worker)]
interface WebGLFramebuffer : WebGLObject {
};
+[Exposed=(Window,Worker)]
interface WebGLProgram : WebGLObject {
};
+[Exposed=(Window,Worker)]
interface WebGLRenderbuffer : WebGLObject {
};
+[Exposed=(Window,Worker)]
interface WebGLShader : WebGLObject {
};
+[Exposed=(Window,Worker)]
interface WebGLTexture : WebGLObject {
};
+[Exposed=(Window,Worker)]
interface WebGLUniformLocation {
};
+[Exposed=(Window,Worker)]
interface WebGLActiveInfo {
readonly attribute GLint size;
readonly attribute GLenum type;
readonly attribute DOMString name;
};
+[Exposed=(Window,Worker)]
interface WebGLShaderPrecisionFormat {
readonly attribute GLint rangeMin;
readonly attribute GLint rangeMax;
@@ -522,7 +532,7 @@ interface mixin WebGLRenderingContextBase
const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
const GLenum BROWSER_DEFAULT_WEBGL = 0x9244;
- readonly attribute HTMLCanvasElement canvas;
+ [Exposed=Window] readonly attribute HTMLCanvasElement canvas;
readonly attribute GLsizei drawingBufferWidth;
readonly attribute GLsizei drawingBufferHeight;
@@ -730,13 +740,16 @@ interface mixin WebGLRenderingContextBase
void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
};
+[Exposed=(Window,Worker)]
interface WebGLRenderingContext
{
};
WebGLRenderingContext includes WebGLRenderingContextBase;
-[Constructor(DOMString type, optional WebGLContextEventInit eventInit)]
+[Exposed=(Window,Worker),
+ Constructor(DOMString type,
+ optional WebGLContextEventInit eventInit)]
interface WebGLContextEvent : Event {
readonly attribute DOMString statusMessage;
}; |
You can unstage the WebGL changes as it's planned in #561. Here is the expected steps:
|
@saschanaz Thank you for the help! Now all has been done and pushed (see new commit). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Is there anything else needed to get this merged? :) |
@saschanaz Is there anyone else who needs to approve this to get this through? |
@mhegazy will merge this, but maybe he is busy these days? Hmm. |
Sorry to be such a bother but now it's a month since I put up the suggestion to improve one parameter name for the docs and everyone seems to agree it's an improvement. I also went all the way through the W3C to change the parameter name in the spec itself for this. Is there any chance we can get this PR closed? :) |
Also pinging @RyanCavanaugh. |
We're hitting the 3 month mark on this issue and as you can see above other people are starting to go in the same circle I did to fix this issue. To save everyone time, is there anything we can do to get this merged? The change is compatible with all automated tools and is based on the source of truth (W3C standard) so there shouldn't be anything controversial with the change. |
It seems there has been some changes in the team organization. Now @DanielRosenwasser may review this. |
I've been asked to take over TSJS-lib-generator, so I hope I can get it back to an up-to-date state soon. @blixt, one thing to note, I noticed that you changed the source of FileAPI to w3c.github.io from w3.org/TR. This is probably correct for FileAPI since you want to see the new changes. I just want to note it in case it causes too much churn in the future. |
Thank you @sandersn! Yes I updated the source based on a suggestion from a repo contributor. I don't know how much churn this will cause but if it's a lot maybe I can look into how and when the W3C puts master into their working draft (https://www.w3.org/TR/FileAPI/). |
AFAIK the specification is currently pretty stable, so probably won't change too frequently. |
Change from
label
to the more descriptiveencoding
(MDN docs).Fixes microsoft/TypeScript#25797