Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>BlackJack</title>
</head>
<body onload="start();">
<script type="text/javascript" src="subclass.js"></script>
<script type="text/javascript">
(function() {
var initializing = false,
superPattern = // Determine if functions can be serialized
/xyz/.test(function() { xyz; }) ? /\b_super\b/ : /.*/; //#1
// Creates a new Class that inherits from this class
Object.subClass = function(properties) { //#2
var _super = this.prototype;
// Instantiate a base class (but only create the instance,
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Adapter</title>
</head>
<body>
<script type="text/javascript" src="subclass.js"></script>
<script type="text/javascript">