update js
[demo] add callbacks and ratio