You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing input sometimes requires calls to e.g. the Wikidata API, but with the current setup, this has to use synchronous requests, something that should be avoided. I propose the following syntax:
Cite.parseInput(<data>, <optional: callback>)
function callback (result) {result// Parsed input (CSL-JSON)}
Not providing callback (when required) will cause a warning and will probably be deprecated in the next version (so either v0.4 or v1.0). I could add both parseInput and parseInputAsync, to avoid the optional callback and just warning/throwing an error when parseInput is used when requests need to be made.
Parsing input sometimes requires calls to e.g. the Wikidata API, but with the current setup, this has to use synchronous requests, something that should be avoided. I propose the following syntax:
Not providing callback (when required) will cause a warning and will probably be deprecated in the next version (so either
v0.4
orv1.0
). I could add bothparseInput
andparseInputAsync
, to avoid the optional callback and just warning/throwing an error whenparseInput
is used when requests need to be made.The following is possible too (perhaps both?):
This, however, has at least all the problems the one above has, and probably more.
The text was updated successfully, but these errors were encountered: