Coder Social home page Coder Social logo

html-externs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

html-externs's Issues

Use new function type syntax

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".

Work Queue

Tracking the todolist:

  • typed arrays to js.lib
  • js.Promise references to js.lib HaxeFoundation/haxe#8282
  • Remap any other types that have moved to js.lib
  • Add @:pure to typedarray constructors
  • class constants on instances with trailing underscore
  • Re-order overloads for better type interference (this is a work around for an overload bug)
  • Split up either types into abstracts where possible. This one is a bit tricky but worth doing.
  • Add missing userVisibleOnly field, see HaxeFoundation/haxe#9027

Housekeeping

  • Update readme instructions to sync with recent changes
  • Tidy and reorganise scripts to make it easy to reproduce

Migration guide

The migration guide should be updated to reflect recent changes wrt Element-gate :)

HTML input valueAsDate

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.