Search completed in 1.08 seconds.
27 results for "oldValue":
Your results are loading. Please wait...
MutationObserverInit.attributeOldValue - Web APIs
the mutationobserverinit dictionary's optional attributeoldvalue property is used to specify whether or not to record the prior value of the altered attribute in mutationrecord objects denoting attribute value changes.
... syntax var options = { attributeoldvalue: true | false } value a boolean value indicating whether or not the prior value of a changed attribute should be included in the mutationobserver.oldvalue property when reporting attribute value changes.
... if true, oldvalue is set accordingly.
...And 5 more matches
MutationObserverInit.characterDataOldValue - Web APIs
the mutationobserverinit dictionary's optional characterdataoldvalue property is used to specify whether or not the mutationrecord.oldvalue property for dom mutations should be set to the previous value of text nodes which changed.
... if you set the mutationobserverinit.characterdata property to true but don't set characterdataoldvalue to true as well, the mutationrecord will not include information describing the prior state of the text node's contents.
... syntax var options = { characterdataoldvalue: true | false } value a boolean value indicating whether or not to set the mutationrecord's oldvalue property to be a string containing the value of the character node's contents prior to the change represented by the mutation record.
...And 2 more matches
MutationObserverInit.attributes - Web APIs
attributeoldvalue lets you specify whether or not you want the previous value of changed attributes to be included in the mutationrecord's oldvalue property.
... if you set either attributefilter or attributeoldvalue to true, attributes is automatically assumed to be true, even if you don't expressly set it as such.
... function callback(mutationlist) { mutationlist.foreach(function(mutation) { switch(mutation.type) { case "attributes": notifyuser("attribute name " + mutation.attributename + " changed to " + mutation.target[mutation.attributename] + " (was " + mutation.oldvalue + ")"); break; } }); } var targetnode = document.queryselector("#target"); var observer = new mutationobserver(callback); observer.observe(targetnode, { attributes: true, attributeoldvalue: true }); the callback() function—which will be passed into the observe() method when starting the observer, looks at each item in the list of mutationrecord objects.
...And 2 more matches
StorageEvent - Web APIs
/><text x="176" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">storageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} method overview void initstorageevent( in domstring type, in boolean canbubble, in boolean cancelable, in domstring key, in domstring oldvalue, in domstring newvalue, in usvstring url, in storage storagearea ); attributes attribute type description key domstring represents the key changed.
... oldvalue domstring the original value of the key.
... the oldvalue is null when the key has been newly added and therefore doesn't have any previous value.
...And 2 more matches
nsIMsgFolder
imsgfolder folder); boolean containschildnamed(in astring name); nsimsgfolder getchildnamed(in astring aname); nsimsgfolder findsubfolder(in acstring escapedsubfoldername); void addfolderlistener(in nsifolderlistener listener); void removefolderlistener(in nsifolderlistener listener); void notifypropertychanged(in nsiatom property, in acstring oldvalue, in acstring newvalue); void notifyintpropertychanged(in nsiatom property, in long oldvalue, in long newvalue); void notifyboolpropertychanged(in nsiatom property, in boolean oldvalue, in boolean newvalue); void notifypropertyflagchanged(in nsimsgdbhdr item, in nsiatom property, in unsigned long oldvalue, in unsigned long newvalue); void notifyunicharpropertych...
...anged(in nsiatom property, in astring oldvalue, in astring newvalue); void notifyitemadded(in nsisupports item); void notifyitemremoved(in nsisupports item); void notifyfolderevent(in nsiatom event); void listdescendents(in nsisupportsarray descendents); void shutdown(in boolean shutdownchildren); void setinvfeditsearchscope(in boolean asearchthisfolder, in boolean asetonsubfolders); void copydatatooutputstreamforappend(in nsiinputstream aistream, in long alength, in nsioutputstream outputstream); void copydatadone(); void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey a...
... nsimsgfolder findsubfolder(in acstring escapedsubfoldername); addfolderlistener() void addfolderlistener(in nsifolderlistener listener); removefolderlistener() void removefolderlistener(in nsifolderlistener listener); notifypropertychanged() void notifypropertychanged(in nsiatom property, in acstring oldvalue, in acstring newvalue); notifyintpropertychanged() void notifyintpropertychanged(in nsiatom property, in long oldvalue, in long newvalue); notifyboolpropertychanged() void notifyboolpropertychanged(in nsiatom property, in boolean oldvalue, ...
... in boolean newvalue); notifypropertyflagchanged() void notifypropertyflagchanged(in nsimsgdbhdr item, in nsiatom property, in unsigned long oldvalue, in unsigned long newvalue); notifyunicharpropertychanged() void notifyunicharpropertychanged(in nsiatom property, in astring oldvalue, in astring newvalue); notifyitemadded() void notifyitemadded(in nsisupports item); notifyitemremoved() void notifyitemremoved(in nsisupports item); notifyfolderevent() void notifyfolderevent(in nsiatom event); listdescendents() ists all descendents, not just first level children.
MutationObserverInit - Web APIs
the default value is true if either of attributefilter or attributeoldvalue is specified, otherwise the default value is false.
... attributeoldvalue optional set to true to record the previous value of any attribute that changes when monitoring the node or nodes for attribute changes; see monitoring attribute values in mutationobserver for details on watching for attribute changes and value recording.
...the default value is true if characterdataoldvalue is specified, otherwise the default value is false.
... characterdataoldvalue optional set to true to record the previous value of a node's text whenever the text changes on nodes being monitored.
source-editor.jsm
it has the following properties: property type description oldvalue object the previously-selected range of text.
... the objects used for oldvalue and newvalue each have two properties of type number: start and end, describing the start and end positions of the range of characters.
...this event has the following properties: property type description oldvalue boolean the previous state of the dirty flag.
CSSStyleDeclaration.removeProperty() - Web APIs
syntax var oldvalue = style.removeproperty(property); parameters property is a domstring representing the property name to be removed.
... return value oldvalue is a domstring equal to the value of the css property before it was removed.
... example the following javascript code removes the background-color css property from a selector rule: var declaration = document.stylesheets[0].rules[0].style; var oldvalue = declaration.removeproperty('background-color'); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.removeproperty()' in that specification.
MutationObserverInit.attributeFilter - Web APIs
function callback(mutationlist) { mutationlist.foreach(function(mutation) { switch(mutation.type) { case "attributes": switch(mutation.attributename) { case "status": userstatuschanged(mutation.target.username, mutation.target.status); break; case "username": usernamechanged(mutation.oldvalue, mutation.target.username); break; } break; } }); } var userlistelement = document.queryselector("#userlist"); var observer = new mutationobserver(callback); observer.observe(userlistelement, { attributefilter: [ "status", "username" ], attributeoldvalue: true, subtree: true }); the callback() function—which will be passed into the observe() method whe...
... note the use of mutationrecord.oldvalue to get the previous value of the "username" property so we have that information when doing lookups in our local array of users.
...the attributeoldvalue option is set to true because we want the prior value of the changed attributes recorded and reported in the mutation records we receive.
Array.observe() - Archive of obsolete content
oldvalue: only for "update" and "delete" types.
... examples logging different change types var arr = ['a', 'b', 'c']; array.observe(arr, function(changes) { console.log(changes); }); arr[1] = 'b'; // [{type: 'update', object: <arr>, name: '1', oldvalue: 'b'}] arr[3] = 'd'; // [{type: 'splice', object: <arr>, index: 3, removed: [], addedcount: 1}] arr.splice(1, 2, 'beta', 'gamma', 'delta'); // [{type: 'splice', object: <arr>, index: 1, removed: ['b', 'c'], addedcount: 3}] specifications strawman proposal specification.
Object.observe() - Archive of obsolete content
oldvalue: only for "update" and "delete" types.
... examples logging all six different types var obj = { foo: 0, bar: 1 }; object.observe(obj, function(changes) { console.log(changes); }); obj.baz = 2; // [{name: 'baz', object: <obj>, type: 'add'}] obj.foo = 'hello'; // [{name: 'foo', object: <obj>, type: 'update', oldvalue: 0}] delete obj.baz; // [{name: 'baz', object: <obj>, type: 'delete', oldvalue: 2}] object.defineproperty(obj, 'foo', {writable: false}); // [{name: 'foo', object: <obj>, type: 'reconfigure'}] object.setprototypeof(obj, {}); // [{name: '__proto__', object: <obj>, type: 'setprototype', oldvalue: <prototype>}] object.seal(obj); // [ // {name: 'foo', object: <obj>, type: 'reconfigure'}, // {...
Mail event system
notifydeleteormovemessages ondeleteormovemessages sample code in this example, a listener will be set up to be notified when the message count changes in a folder: // our variable to know if the listener fired var listenerhasfired = false; var totalmessageslistenerhasfired = false; // the listening function that will react to changes function myonintpropertychanged(item, property, oldvalue, newvalue) { listenerhasfired=true; var propertystring = property.getunicode(); dump("onintpropertychanged has fired with property + " + propertystring + "!\n"); if (propertystring == "totalmessages") { totalmessageslistenerhasfired=true; //now show us visually var folder = item.queryinterface(components.interfaces.nsimsgfolder); dump("the folder " + folder.pret...
...tyname + " now has " + newvalue + " messages."); } else if (propertystring == "testproperty") { dump("recieved integer test property fired on folder " + folder.prettyname + " with values " + oldvalue + " and " + newvalue + "\n"); } // set up the folder listener to point to the above function var folderlistener = { onitemadded: function(parent, item, viewstring) {}, onitemremoved: function(parent, item, viewstring) {}, onitempropertychanged: function(parent, item, viewstring) {}, onitemintpropertychanged: myonintpropertychanged, onitemboolpropertychanged: function(item, property, oldvalue, newvalue) {}, onitemunicharpropertychanged: function(item, property, oldvalue, newvalue) {}, onitempropertyflagchanged: function(item, property, oldflag, newflag) {}, ...
Element.classList - Web APIs
WebAPIElementclassList
"add" : "remove"](val), !!arguments[1]); var oldvalue = this.value; return (this.remove(oldvalue), oldvalue === this.value && (this.add(val), true) /*|| false*/); }; if (!domtokenlistproto.replace || typeof testclass.replace("a", "b") !== "boolean") domtokenlistproto.replace = function(oldtoken, newtoken){ checkifvalidclasslistentry("replace", oldtoken), checkifvalidclasslistentry("replace", newtoken); ...
... var oldvalue = this.value; return (this.remove(oldtoken), this.value !== oldvalue && (this.add(newtoken), true)); }; if (!domtokenlistproto.contains) domtokenlistproto.contains = function(value){ for (var i=0,len=this.length; i !== len; ++i) if (this[i] === value) return true; return false; }; if (!domtokenlistproto.foreach) domtokenlistproto.foreach = function(f){ if (arguments.length === 1) for (var i = 0, len = this.length; i !== len; ++i) f( this[i], i, this); else for (var i=0,len=this.length,targ=arguments[1]; i !== len; ++i) f.call(targ, this[i], i, this); }; if (!domtokenlistproto.entries) domtokenlistproto.entries = function(){ var nextindex = 0, that = this; return {next: function() { ret...
Index - Web APIs
WebAPIIndex
2614 mutationobserverinit.attributeoldvalue api, api reference, attributes, changes, dom, dom whatwg, monitor, mutationobserverinit, observer, property, reference, value the mutationobserverinit dictionary's optional attributeoldvalue property is used to specify whether or not to record the prior value of the altered attribute in mutationrecord objects denoting attribute value changes.
... 2617 mutationobserverinit.characterdataoldvalue api, changes, monitoring, mutation observer, mutation observer api, mutationobserverinit, nodes, reference, textr, characterdataoldvalue, mutation, value the mutationobserverinit dictionary's optional characterdataoldvalue property is used to specify whether or not the mutationrecord.oldvalue property for dom mutations should be set to the previous value of text nodes which changed.
MutationObserver.observe() - Web APIs
(for example, if mutationobserverinit.childlist, mutationobserverinit.attributes, and mutationobserverinit.characterdata are all false.) the value of options.attributes is false (indicating that attribute changes are not to be monitored), but attributeoldvalue is true and/or attributefilter is present.
... the characterdataoldvalue option is true but mutationobserverinit.characterdata is false (indicating that character changes are not to be monitored).
MutationObserverInit.characterData - Web APIs
you can expand the capabilities of attribute mutation monitoring using other options: characterdataoldvalue lets you specify whether or not you want the previous value of changed text nodes to be provided using the mutationrecord's oldvalue property.
... if you set characterdataoldvalue to true, characterdata is automatically assumed to be true, even if you don't expressly set it as such.
MutationRecord - Web APIs
mutationrecord.oldvalue string the return value depends on the mutationrecord.type.
... note that for this to work as expected, attributeoldvalue or characterdataoldvalue must be set to true in the corresponding mutationobserverinit parameter of the mutationobserver observe method specifications specification status comment domthe definition of 'mutationrecord' in that specification.
preferences/service - Archive of obsolete content
value : string preference value, a url to a properties file example: require("sdk/preferences/service").set("general.useragent.locale", "chrome://global/locale/intl.properties"); example: setting global preferences var { get, set } = require("sdk/preferences/service"); var { when: unload } = require("sdk/system/unload"); var oldvalue = get("browser.urlbar.autofill"); set("browser.urlbar.autofill", true); // by amo policy global preferences must be changed back to their original value unload(function() { set("browser.urlbar.autofill", oldvalue); }); ...
Object.unobserve() - Archive of obsolete content
changes); } object.observe(obj, observer); ​ obj.newproperty = 2; // [{name: 'newproperty', object: <obj>, type: 'add'}] object.unobserve(obj, observer); obj.foo = 1; // the callback wasn't called using an anonymous function var person = { name: 'ahmed', age: 25 }; object.observe(person, function(changes) { console.log(changes); }); person.age = 40; // [{name: 'age', object: <obj>, oldvalue: 25, type: 'update'}] object.unobserve(person, function(changes) { console.log(changes); }); person.age = 63; // [{name: 'age', object: <obj>, oldvalue: 40, type: 'update'}] // the callback will always be called specifications not part of any standard.
nsIDOMStorageEventObsolete
method overview void initstorageevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in domstring keyarg, in domstring oldvaluearg, in domstring newvaluearg, in domstring urlarg, in nsidomstorage storageareaarg); attributes attribute type description domain domstring the domain of the storage area which changed, or "#session" if the event represents a change to session storage.
Debugger.Object - Firefox Developer Tools
set(frame,oldvalue,newvalue) the data property namedname of the referent is about to have its value changed fromoldvalue tonewvalue.
Element.shadowRoot - Web APIs
connectedcallback() { console.log('custom square element added to page.'); updatestyle(this); } attributechangedcallback(name, oldvalue, newvalue) { console.log('custom square element attributes changed.'); updatestyle(this); } in the updatestyle() function itself, we get a reference to the shadow dom using element.shadowroot.
MutationObserver.MutationObserver() - Web APIs
the attribute name is in mutation.attributename, and its previous value is in mutation.oldvalue.
ShadowRoot - Web APIs
connectedcallback() { console.log('custom square element added to page.'); updatestyle(this); } attributechangedcallback(name, oldvalue, newvalue) { console.log('custom square element attributes changed.'); updatestyle(this); } in the updatestyle() function itself, we get a reference to the shadow dom using element.shadowroot.
Using the Web Storage API - Web APIs
on the events page (see events.js) the only javascript is as follows: window.addeventlistener('storage', function(e) { document.queryselector('.my-key').textcontent = e.key; document.queryselector('.my-old').textcontent = e.oldvalue; document.queryselector('.my-new').textcontent = e.newvalue; document.queryselector('.my-url').textcontent = e.url; document.queryselector('.my-storage').textcontent = json.stringify(e.storagearea); }); here we add an event listener to the window object that fires when the storage object associated with the current origin is changed.
WindowEventHandlers.onstorage - Web APIs
window.onstorage = function(e) { console.log('the ' + e.key + ' key has been changed from ' + e.oldvalue + ' to ' + e.newvalue + '.'); }; specifications specification status comment html living standardthe definition of 'onstorage' in that specification.
Using custom elements - Web Components
in this case however, we are just running the updatestyle() function again to make sure that the square's style is updated as per the new values: attributechangedcallback(name, oldvalue, newvalue) { console.log('custom square element attributes changed.'); updatestyle(this); } note that to get the attributechangedcallback() callback to fire when an attribute changes, you have to observe the attributes.