Generate placeholder for IDE from WebIDL
npm install web-stubOptimized for WebStorm.
Happy hacking!
Method auto completion
!Method auto completion
Params auto completion
!Params auto completion
Params type-sensitive completion
!Params type sensitive completion
Params validation
!Params type check
Download this package by npm install web-stub or git clone https://github.com/ranmocy/web-stub.git.
Setup your IDE to add web-stub/js folder or any JS file under it to be a library.
Note: Do not include this folder to your production code. This is for IDE only.
WebStorm:
!WebStorm settings
* WebIDL2
* DOMStandard
* WebAppAPI
* WebComponent
* IndexedDB
* Fetch
* ...Upcoming
Install dependencies: npm install
To get WebIDL: node . update
To generate JS files from WebIDL: node .
To continuesly generate files: rvm 2.3 do rerun -p 'idl/*|main.js' -x -- node .
To test: node . all && if ! git diff-index --quiet HEAD; then exit 1; fi
There are ways that you can contribute to this project:
1. Create Issue if you found IDE have issue about the interface. Please find the minimal code snippet that can reproduce the issue. Better with a screenshot.
2. Provide more WebIDL that is commonly used. Please attach the link to W3C definition website like https://www.w3.org/TR/IndexedDB/.
3. Send pull request on main.js. It currently can not handle all cases of WebIDL. Please help me to support more WebIDLs.