Skip to content

Instantly share code, notes, and snippets.

@maurodoglio
maurodoglio / observer.js
Created December 7, 2012 10:30
Mauro's observer - updated to create two models
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>My js observer</title>
<script type="text/javascript">
"use strict";
var Model = function(){
this.observers = [];
this.value = null
@maurodoglio
maurodoglio / observer.js
Created December 6, 2012 20:59
Mauro's observer
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script type="text/javascript">
var Model = function(){};
Model.prototype = {
'value' : null,