haxefoundation / html-externs Goto Github PK
View Code? Open in Web Editor NEWHTML externs for Haxe
HTML externs for Haxe
Would it be possible to fix this?
It would be great if we could support the new function type since this would provide richer completion/documentation for the working with JavaScript. I noticed this information is already available in the webidls.
For example; BaseAudioContext webidl:
callback DecodeSuccessCallback = void (AudioBuffer decodedData);
callback DecodeErrorCallback = void (DOMException error);
...
Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData,
optional DecodeSuccessCallback successCallback,
optional DecodeErrorCallback errorCallback);
Currently we generate:
function decodeAudioData(audioData:js.lib.ArrayBuffer, ?successCallback:AudioBuffer->Void, ?errorCallback:js.html.DOMException->Void):Promise<AudioBuffer>;
This could be improved like this:
function decodeAudioData(audioData:js.lib.ArrayBuffer, ?successCallback:(decodedData:AudioBuffer) -> Void,
?errorCallback:(error:DOMException) -> Void):Promise<AudioBuffer>;
.. or with typedef
function decodeAudioData(audioData:js.lib.ArrayBuffer, ?successCallback:DecodeSuccessCallback, ?errorCallback:DecodeErrorCallback):Promise<AudioBuffer>;
typedef DecodeSuccessCallback = (decodedData:AudioBuffer) -> Void;
typedef DecodeErrorCallback = (error:DOMException) -> Void;
If the info is not available we can always fallback to the "old syntax".
Things like https://github.com/HaxeFoundation/html-externs/blob/master/webidl/mozilla/Console.webidl#L10 should generate haxe.extern.Rest
.
I found this older documentation here:
https://github.com/HaxeFoundation/haxe/blob/a06f9d35ae138be1e163444146354933301697f4/std/js/html/CSSRule.hx
The current looks like this:
https://github.com/HaxeFoundation/haxe/blob/development/std/js/html/CSSRule.hx
Which result in:
http://api.haxe.org/js/html/CSSRule.html
As far as I see, there is no documentation in the full package anymore. Can we get this back?
Might make a lot of sense to hook into this to minimise development effort
Tracking the todolist:
userVisibleOnly
field, see HaxeFoundation/haxe#9027Removing prefixes of type names has caused confusions and issues (see HaxeFoundation/haxe#9085)
Consider rebuilding with original names and moving to another directory (deprecating js.html) if necessary
The migration guide should be updated to reflect recent changes wrt Element-gate :)
In haxe 3.2 version, InputElement has no longer valueAsDate field and so, the value can't be interpreted as a date
Could this field be add or maybe there is a reason to avoid using it ?
refers to HaxeFoundation/haxe#5034
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.