update: add 'hasCap(flag)' function to WTVClientSessionData for easier client-capabilities checking (see wtv-home/home.js for an example)
This commit is contained in:
@@ -9,11 +9,19 @@ class WTVClientSessionData {
|
||||
\***********************************/
|
||||
|
||||
data_store = null;
|
||||
capabilities = null;
|
||||
|
||||
constructor() {
|
||||
this.data_store = new Array();
|
||||
}
|
||||
|
||||
hasCap(cap) {
|
||||
if (this.capabilities) {
|
||||
return this.capabilities[cap] || false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
get(key = null) {
|
||||
if (typeof (this.data_store) === 'undefined') return null;
|
||||
else if (key === null) return this.data_store;
|
||||
|
||||
Reference in New Issue
Block a user