This file contains hidden or 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
/** | |
* Simple MVC, 2016 Todd Zebert | |
* Model module | |
*/ | |
var simpleMVC = (function simpleMVC(simple) { | |
'use strict'; | |
simple.Model = function SimpleModel(data) { | |
this._data = data; |
This file contains hidden or 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> | |
<head> | |
<script src="loa.js"></script> | |
</head> | |
<body> | |
<h1 id="fade-in-slow">Fade in slow</h1> | |
<h2 id="fade-out-slower">Fade out slower</h2> | |
<h3 id="fade-in-out">Fade in and out</32> | |
<script> |
This file contains hidden or 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
/** | |
* Event Listeners and notifications module | |
*/ | |
var simpleMVC = (function simpleMVC(simple) { | |
'use strict'; | |
// sender is the context of the Model or View which originates the event | |
simple._Event = function SimpleEvent(sender) { | |
this._sender = sender; | |
this._listeners = []; |
NewerOlder