1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 07:36:48 +02:00

Add some comments to tomahawk.js

This commit is contained in:
Uwe L. Korn
2013-08-24 18:39:03 +02:00
parent 39d12f573e
commit ee9d6e03ad

View File

@@ -80,6 +80,9 @@ Tomahawk.versionCompare = function (version1, version2) {
return 0; return 0;
}; };
/**
* Check if this is at least specified tomahawk-api-version.
*/
Tomahawk.atLeastVersion = function (version) { Tomahawk.atLeastVersion = function (version) {
return (Tomahawk.versionCompare(version, Tomahawk.apiVersion) >= 0) return (Tomahawk.versionCompare(version, Tomahawk.apiVersion) >= 0)
}; };
@@ -135,7 +138,9 @@ var TomahawkUrlType = {
}; };
// Resolver BaseObject, inherit it to implement your own resolver /**
* Resolver BaseObject, inherit it to implement your own resolver.
*/
var TomahawkResolver = { var TomahawkResolver = {
init: function() { init: function() {
}, },
@@ -244,7 +249,10 @@ Tomahawk.valueForSubNode = function (node, tag) {
return element.textContent; return element.textContent;
}; };
/**
* Do a synchronous HTTP(S) request. For further options see
* Tomahawk.asyncRequest
*/
Tomahawk.syncRequest = function (url, extraHeaders, options) { Tomahawk.syncRequest = function (url, extraHeaders, options) {
// unpack options // unpack options
var opt = options || {}; var opt = options || {};