Details
-
Type:
Sub-task
-
Status: Closed
-
Priority:
None
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 3.4.0
-
Component/s: Content Assist, JS, Modules
-
Labels:None
-
Sprint:To Be Scheduled
Description
Our Javascript index code can understand JS object literal definitions with properties defined in key/value pairs. But if you use a constructor function with property assignments to "this" we don't understand that at all.
Example:
function MobilewareSdk() { |
this.version = "0.0.0"; |
this.name = "customerevent"; |
this.apis = {}; |
this.apis["customerevent"] = { |
this.version = "0.0.0"; |
this.name = "customerevent"; |
this.login = function() { |
// you get the idea... |
}
|
};
|
}
|
This is actually pretty complex in that we need to understand the shifting context of this as we go into the nested "layers" here. Additionally, note the element/property access using a string key for defining the apis.customerevent type.