-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c58820
commit 3331deb
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Observable Array</title> | ||
</head> | ||
<body> | ||
|
||
<!-- observable-array depends on subscribable.js --> | ||
<script src="bower_components/subscribable.js/subscribable.js"></script> | ||
<script src="observable-array.js"></script> | ||
|
||
<script style="display: block; white-space: pre;">function log() { | ||
console.log('this: ', this, '\narguments: ', arguments); | ||
} | ||
|
||
var nums = new ObservableArray([1,6,4,76,46,3,5,6,3,5,4,33,3]); | ||
|
||
nums.on('push', log); | ||
|
||
nums.push(8, 7); | ||
</script> | ||
</body> | ||
</html> |