react-native-wordpress-editor
Version:
React Native Wrapper for WordPress Rich Text Editor. The WordPress-Editor is the text editor used in the official WordPress mobile apps to create and edit pages & posts
23 lines (16 loc) • 621 B
JavaScript
// MARK: - Constructor
function WPHybridLogger(callbacker, parameterSeparator) {
this.callbacker = callbacker;
this.parameterSeparator = parameterSeparator;
};
// MARK: - Logging
WPHybridLogger.prototype.log = function(msg) {
this.callbacker.callback('callback-log', 'msg=' + msg);
};
WPHybridLogger.prototype.logError = function(msg, url, line) {
var arguments = ["msg=" + msg,
"url=" + url,
"line=" + line];
var joinedArguments = arguments.join(this.parameterSeparator);
this.callbacker.callback('callback-log-error', joinedArguments);
};