added: compatibility with cordova