JSFiddle - React, Tailwind, and code Playground
by David Kyle
HTML
<div>
Hi
</div>
JavaScript
var ValidatableRequest = function(data) {
var self = this;
self.IsValid = false;
self.Validate = function(sourceModel) {
};
};
ValidatableRequest.prototype = new Object;
var UpdateTaskRequest = function(data) {
var self = this;
self.Id = "";
self.TaskName = "";
if(data != null && data != undefined) {
self.Id = data.Id;
self.TaskName = data.TaskName;
} // end if
};
UpdateTaskRequest.prototype = new ValidatableRequest;
var UpdateJobTaskRequest = function(data) {
var self = this;
self.JobId = "";
if(data != null && data != undefined) {
//Set initial data
self.JobId = data.JobId;
} // end if
};
UpdateJobTaskRequest.prototype = new UpdateTaskRequest;
var UpdateContainerTaskRequest = function(data) {
var self = this;
self.ContainerId = "";
if(data != null && data != undefined) {
self.ContainerId = data.ContainerId;
} // end if
};
UpdateContainerTaskRequest.prototype = new UpdateTaskRequest;
var Factories = (function () {
var ObjectCreationException = function(data) {
var self = this;
self.FormattedMessage = "";
self.Value = "";
self.name = "ObjectCreationException";
if(data != null) {
self.FormattedMessage = data.MessageFormat;
self.Value = data.Value;
} // end if
//DOC_IMPORTANT: Self invoking function is required as the message prototype is a string value, this allows us to perform logic but show the correct value to console's and debuggers.
self.message = function() {
return self.FormattedMessage.replace("{0}", self.Value);
}();
};
ObjectCreationException.prototype = new Error();
var internalValidatableRequestFactory = (function () {
var types = null;
internalCreate = function(aType) {
if(aType != null && aType != undefined && aType != "") {
if(types != null) {
...