CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sun, 24 Aug 2025 18:36:50 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090325044558
location: https://web.archive.org/web/20090325044558/https://github.com/raid-ox/mutable.js/tree/master
server-timing: captures_list;dur=0.823092, exclusion.robots;dur=0.027085, exclusion.robots.policy;dur=0.010800, esindex;dur=0.016281, cdx.remote;dur=42.244596, LoadShardBlock;dur=344.600314, PetaboxLoader3.datanode;dur=97.910423, PetaboxLoader3.resolve;dur=142.419292
x-app-server: wwwb-app211
x-ts: 302
x-tr: 449
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app211; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sun, 24 Aug 2025 18:36:50 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Wed, 25 Mar 2009 04:45:58 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 464ms
x-archive-orig-etag: "02199b767497813cd282ee4c363813c1"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 17385
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Wed, 25 Mar 2009 04:45:58 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Wed, 25 Mar 2009 04:45:58 GMT", ; rel="memento"; datetime="Wed, 25 Mar 2009 04:45:58 GMT", ; rel="next memento"; datetime="Sun, 01 Nov 2009 17:53:22 GMT", ; rel="last memento"; datetime="Wed, 26 Apr 2017 18:53:03 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_8_20090324224149_crawl102-c/52_8_20090325044415_crawl101.arc.gz
server-timing: captures_list;dur=0.609493, exclusion.robots;dur=0.023823, exclusion.robots.policy;dur=0.010807, esindex;dur=0.011858, cdx.remote;dur=7.695794, LoadShardBlock;dur=334.000273, PetaboxLoader3.datanode;dur=139.270473, PetaboxLoader3.resolve;dur=206.205344, load_resource;dur=109.222103
x-app-server: wwwb-app211
x-ts: 200
x-tr: 518
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
raid-ox's mutable.js at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Description: | Mutable Property for Javascript with support for Getter Setter & Binding |
Clone URL: |
git://github.com/raid-ox/mutable.js.git
Give this clone URL to anyone.
git clone git://github.com/raid-ox/mutable.js.git
|
name | age | message | |
---|---|---|---|
![]() |
README | Sat Mar 21 03:53:50 -0700 2009 | update [raid-ox] |
![]() |
src/ | Sat Mar 21 03:42:26 -0700 2009 | update [raid-ox] |
![]() |
test/ | Sat Mar 21 03:42:26 -0700 2009 | update [raid-ox] |
MUTABLE.JS Mutable.js is a Javascript Getter/Setter Class with support for binding, locking and property watching. SUPPORT Mutable.js is supported by Firefox, Internet Explorer, Safari and Opera (version 10+) USAGE Include Mutable.js to your page DEFINING --------------- JAVASCRIPT -------------- var object = { // a variable that convert its assigned value to interger. a: new Mutable({ value: 0, setter: function(value) { this.value = parseInt(value); } }), // get a and multiple it by two b: new Mutable({ getter: function() { return this.parent.a() * 2; } }) }; ----------------------------------------- BINDING --------------- JAVASCRIPT -------------- var a = {}; a.value = new Mutable({ value: 0, setter: function(x) { this.value = x; alert(x); } }); var b = {}; b.value = new Mutable({value:1}); var c = {}; c.value = new Mutable({value:10}); a.value.bind(function(){ return b.value() * c.value(); }); // Alert 10 b.value(2); // Alert 20 c.value(20) // Alert 40 a.value.unbind(); c.value(15); // no alert ----------------------------------------- LOCKING --------------- JAVASCRIPT -------------- var a = {value: new Mutable({value:0})}; function fn1(){a.value(1);}; function fn2(){a.value(5);}; function fn3(){a.value(10);}; a.lock(fn1, fn3); fn1() // a.value = 1 fn2() // a.value = 1 fn3() // a.value = 10 a.lock(fn2); // can't modify lock again fn2() // a.value = 10 ----------------------------------------- LOCKING --------------- JAVASCRIPT -------------- var a = {value: new Mutable({value:0})}; function fn(oldval, newval){ alert('a.value changed from ' + oldval + ' to ' + newval); } a.watch(fn); a.value(1); // alert: a.value changed from 0 to 1 a.value(1); // no alert a.value(10); // alert: a.value changed from 1 to 10 a.value.unwatch(fn); a.value(12); // no alert -----------------------------------------
This feature is coming soon. Sit tight!