How to use the applyAsync function from bindings

Find comprehensive JavaScript bindings.applyAsync code examples handpicked from public code repositorys.

152
153
154
155
156
157
158
159
160
161
}

var docResult = new libxmljs.Document();

if (callback) {
        binding.applyAsync(this.stylesheetObj, source, paramsArray, outputString, docResult, function(err, strResult){
                if (err) return callback(err);
                callback(null, outputString ? strResult : docResult);
        });
} else {
fork icon62
star icon50
watch icon12

+ 9 other calls in file

128
129
130
131
132
133
134
135
136
137
// for some obscure reason I didn't manage to create a new libxmljs document in applySync,
// but passing a document by reference and modifying its content works fine
var result = new libxmljs.Document();

if (callback) {
        binding.applyAsync(this.stylesheetObj, source, paramsArray, result, function(err){
                if (err) return callback(err);
                callback(null, outputString ? result.toString() : result);
        });
} else {
fork icon62
star icon0
watch icon10

+ 7 other calls in file

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)