This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# ./createapp.sh myappname | |
# | |
app=$1 | |
mkdir $app && cd $app | |
# get the command line parameter to set the name to the app to generate (simulating press ENTER to the git repo answer) | |
echo -ne '\n' | qcobjects create $app | |
# download official gitignore file | |
curl -lL https://raw.githubusercontent.com/QuickCorp/qcobjects-new-app/master/.gitignore > .gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" /> | |
<!-- This is a wide open CSP declaration. To lock this down for production, see below. --> | |
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: https://ssl.gstatic.com; img-src * 'self' data:; child-src *; style-src * 'self' 'unsafe-inline' 'unsafe-eval'; script-src * 'self' 'unsafe-inline' 'unsafe-eval'; connect-src * 'self' 'unsafe-inline' 'unsafe-eval';media-src *"> | |
<title>QCObjects Hello World</title> | |
<script type="text/javascript" src="https://qcobjects.dev/QCObjects.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" /> | |
<!-- This is a wide open CSP declaration. To lock this down for production, see below. --> | |
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: https://ssl.gstatic.com; img-src * 'self' data:; child-src *; style-src * 'self' 'unsafe-inline' 'unsafe-eval'; script-src * 'self' 'unsafe-inline' 'unsafe-eval'; connect-src * 'self' 'unsafe-inline' 'unsafe-eval';media-src *"> | |
<title>QCObjects Hello World</title> | |
<script type="text/javascript" src="https://qcobjects.dev/QCObjects.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will create a QCObjects class named "canvas" extending a HTMLCanvasElement with a customAttr property that has a "custom" value | |
Class('canvas',HTMLCanvasElement,{ | |
customAttr:'custom' | |
}); | |
// This will declare an instance canvas1 from the class canvas | |
let canvas1 = New(canvas,{ | |
width:100, | |
height:100, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class('MyClassName',InheritClass,{ | |
propertyName1:0, // just to declare purpose | |
propertyName2:'', | |
classMethod1: function (){ | |
// some code here | |
// note you can use "this" object | |
return this.propertyName1; | |
}, | |
classMethod2: function () { | |
// some code here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dataObject = {id:1, | |
prop1:1, | |
prop2:2 | |
}; | |
var cache = new ComplexStorageCache({ | |
index: dataObject.id, | |
load: (cacheController) => { | |
dataObject = { | |
id:dataObject.id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js" lang="en"> | |
<body> | |
<container id="contentLoader" ></container> | |
</body> | |
</html> |