Skip to content

Instantly share code, notes, and snippets.

@pea3nut
Last active October 7, 2018 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pea3nut/69458fc2ea0440516b8f9f238d999ab1 to your computer and use it in GitHub Desktop.
Save pea3nut/69458fc2ea0440516b8f9f238d999ab1 to your computer and use it in GitHub Desktop.
Pxer Construct
(async function(){
const pxer = new PxerEngine();
pxer.exec('fetch_bookmarks', {id:2888, r18:false}, function(worksList){
// 被调用多次
});
}());
(async function(){
const pxer = new PxerEngine();
const collection = PxerEngine.fetch_bookmarks({id:2888, r18:false});
const worksList = [];
collection.onData = function(chunks){
worksList.push(chunks);
// 被调用多次
};
collection.onEnd = function(chunks){
// collection.data 与 worksList 具有相同内容
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment