siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
80 lines (61 loc) • 1.97 kB
HTML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js">/*
Siesta 5.6.1
Copyright(c) 2009-2022 Bryntum AB
https://bryntum.com/contact
https://bryntum.com/products/siesta/license
*/
Ext.define('ExtX.Reference.Slot', {
override : 'Ext.Component',
slot : null,
__COLLECTOR__ : null,
onRemoved : function() {
if (this.__COLLECTOR__) {
delete this.__COLLECTOR__.slots[this.slot]
delete this.__COLLECTOR__
}
this.callOverridden(arguments)
},
beforeDestroy : function () {
if (this.__COLLECTOR__) {
delete this.__COLLECTOR__.slots[this.slot]
delete this.__COLLECTOR__
}
this.callOverridden(arguments)
}
})
Ext.define('ExtX.Reference.Slot2', {
override : 'Ext.Container',
slots : null,
onAdd : function () {
this.cascade(function (comp) {
if (comp.slot && !comp.__COLLECTOR__) {
var parentWithSlots = comp.__COLLECTOR__ = comp.up('{slots}')
if (parentWithSlots) parentWithSlots.slots[ comp.slot ] = comp
}
})
},
initComponent : function () {
if (this.slots) this.slots = {}
this.callOverridden()
}
})
</pre>
</body>
</html>