Search completed in 1.33 seconds.
13 results for "attachevent":
Forms related code snippets - Archive of obsolete content
Archive › Add-ons › Code snippets › Forms
", "S", "S"], bZeroIsMonday = true, /* internal usage */ aInstances = [], aMonthLengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], rBgnNaN = /^\D+/, rBgnANDEnd = /^\D+|\D+\d+$/g, rMonth = /\-month\-/, rDecrease = /\-decr\-/; var /* customizable by user */ nZIndex = 1000; window.addEventListener ? ...
... bZeroIsMonday = true, /* internal usage */ aInstances = [], aMonthLengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], rBgnNaN = /^\D+/, rBgnANDEnd = /^\D+|\D+\d+$/g, rMonth = /\-month\-/, rDecrease = /\-decr\-/; var /* customizable by user */ nZIndex = 1000; window.addEventListener ? addEventListener("load", buildCalendars, false) : window.attachEvent ? ...
...gnANDEnd = /^\D+|\D+\d+$/g, rMonth = /\-month\-/, rDecrease = /\-decr\-/; var /* customizable by user */ nZIndex = 1000; window.addEventListener ? addEventListener("load", buildCalendars, false) : window.attachEvent ? attachEvent("onload", buildCalendars) : (onload = buildCalendars); document.addEventListener ? document.addEventListener("mousedown", onDocClick, false) : document.attachEvent ? ...
...$/g, rMonth = /\-month\-/, rDecrease = /\-decr\-/; var /* customizable by user */ nZIndex = 1000; window.addEventListener ? addEventListener("load", buildCalendars, false) : window.attachEvent ? attachEvent("onload", buildCalendars) : (onload = buildCalendars); document.addEventListener ? document.addEventListener("mousedown", onDocClick, false) : document.attachEvent ? ...
EventTarget.addEventListener() - Web APIs
Web › API › EventTarget › addEventListener
t reference. When two variables reference the same object (e.g., let a = b = {aProperty: 'Yeah'};), changing the data in either variable will affect the other. Note: Because objects are stored in variables by reference, you can return an object from a function to keep it alive (preserve it in memory so you don't lose the data) after that function stops executing. ...
... b = {aProperty: 'Yeah'};), changing the data in either variable will affect the other. Note: Because objects are stored in variables by reference, you can return an object from a function to keep it alive (preserve it in memory so you don't lose the data) after that function stops executing. Legacy Internet Explorer and attachEvent In Internet Explorer versions before IE 9, you have to use attachEvent(), rather than the standard addEventListener(). For IE, we modify the preceding example to: if (el.addEventListener) { el.addEventListener('click', modifyText, false); } else if (el.attachEvent) { el.attachEvent('onclick', modifyText); } There is a drawback to attachEvent(): The value of this will be a reference to the window object, instead of the element on which it was fired. The atta...
....target=e.srcElement; e.currentTarget=self; if (typeof listener.handleEvent != 'undefined') { listener.handleEvent(e); } else { listener.call(self,e); } }; if (type=="DOMContentLoaded") { var wrapper2=function(e) { if (document.readyState=="complete") { wrapper(e); } }; document.attachEvent("onreadystatechange",wrapper2); eventListeners.push({object:this,type:type,listener:listener,wrapper:wrapper2}); if (document.readyState=="complete") { var e=new Event(); e.srcElement=window; wrapper2(e); } } else { this.attachEvent("on"+type,wrapper); eventListeners.push({object:this,type:type,listener:listener,wrapper:...
jspage - Archive of obsolete content
Archive › Mozilla › Jetpack › jspage
:"window"}}; new Window(window);var Document=new Native({name:"Document",legacy:(Browser.Engine.trident)?null:window.Document,initialize:function(a){$uid(a);a.head=a.getElementsByTagName("head")[0]; a.html=a.getElementsByTagName("html")[0];if(Browser.Engine.trident&&Browser.Engine.version<=4){$try(function(){a.execCommand("BackgroundImageCache",false,true); });}if(Browser.Engine.trident){a.window.attachEvent("onunload",function(){a.window.detachEvent("onunload",arguments.callee);a.head=a.html=a.window=null; });}return $extend(a,Document.Prototype);},afterImplement:function(b,a){document[b]=Document.Prototype[b]=a;}});Document.Prototype={$family:{name:"document"}}; new Document(document);Array.implement({every:function(c,d){for(var b=0,a=this.length;b<a;b++){if(!c.call(d,this[b],b,this)){return false;...
...s.contains)?(this!=l&&this.contains(l)):!!(this.compareDocumentPosition(l)&16); },match:function(l){return(!l||(l==this)||(Element.get(this,"tag")==l));}});Native.implement([Element,Window,Document],{addListener:function(o,n){if(o=="unload"){var l=n,m=this; n=function(){m.removeListener("unload",n);l();};}else{h[this.uid]=this;}if(this.addEventListener){this.addEventListener(o,n,false);}else{this.attachEvent("on"+o,n); }return this;},removeListener:function(m,l){if(this.removeEventListener){this.removeEventListener(m,l,false);}else{this.detachEvent("on"+m,l);}return this; },retrieve:function(m,l){var o=c(this.uid),n=o[m];if(l!=undefined&&n==undefined){n=o[m]=l;}return $pick(n);},store:function(m,l){var n=c(this.uid);n[m]=l; return this;},eliminate:function(l){var m=c(this.uid);delete m[l];return this...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
Archive › Mozilla › Migrate apps from Internet Explorer to Mozilla
ve multiple event listeners for the same event, each calling another function. Thus, to remove an event listener requires all three parameters be the same as the ones you use when adding the listener. Mozilla does not support Internet Explorer's method of converting <script> tags into event handlers, which extends <script> with for and event attributes (see Table 5). It also does not support the attachEvent and detachEvent methods. Instead, you should use the addEventListener and removeEventListener methods. Internet Explorer does not support the W3C events specification. However, IE can be remediated to support addEventListener and removeEventListener. Table 5. Event method differences between Mozilla and Internet Explorer Internet Explorer Method Mozilla Method Description ...
...nd detachEvent methods. Instead, you should use the addEventListener and removeEventListener methods. Internet Explorer does not support the W3C events specification. However, IE can be remediated to support addEventListener and removeEventListener. Table 5. Event method differences between Mozilla and Internet Explorer Internet Explorer Method Mozilla Method Description attachEvent(aEventType, aFunctionReference) addEventListener(aEventType, aFunctionReference, aUseCapture) Adds an event listener to a DOM element. detachEvent(aEventType, aFunctionReference) removeEventListener(aEventType, aFunctionReference, aUseCapture) Removes an event listener to a DOM element. Rich text editing While Mozilla prides itself with being the most W3C web standard...
onMSVideoFormatChanged - Web APIs
Web › API › HTMLVideoElement › onMSVideoFormatChanged
er. There may also be large incompatibilities between implementations and the behavior may change in the future. onMSVideoFormatChanged is an event which occurs when the video format changes. This proprietary property is specific to Internet Explorer and Microsoft Edge. ...
...ncompatibilities between implementations and the behavior may change in the future. onMSVideoFormatChanged is an event which occurs when the video format changes. This proprietary property is specific to Internet Explorer and Microsoft Edge. ...
onMSVideoFrameStepCompleted - Web APIs
Web › API › HTMLVideoElement › onMSVideoFrameStepCompleted
tween implementations and the behavior may change in the future. onMSVideoFrameStepCompleted is an event which occurs when the video frame has been stepped forward or backward one frame. This proprietary property is specific to Internet Explorer and Microsoft Edge. ...
... behavior may change in the future. onMSVideoFrameStepCompleted is an event which occurs when the video frame has been stepped forward or backward one frame. This proprietary property is specific to Internet Explorer and Microsoft Edge. ...
onMSVideoOptimalLayoutChanged - Web APIs
Web › API › HTMLVideoElement › onMSVideoOptimalLayoutChanged
ibilities between implementations and the behavior may change in the future. onMSVideoOptimalLayoutChanged is an event which occurs when the msIsLayoutOptimalForPlayback state changes. This proprietary property is specific to Internet Explorer and Microsoft Edge. ...
...ions and the behavior may change in the future. onMSVideoOptimalLayoutChanged is an event which occurs when the msIsLayoutOptimalForPlayback state changes. This proprietary property is specific to Internet Explorer and Microsoft Edge. ...
Ajax navigation example - Web APIs
Web › API › History API › Example
...
... ...
Index - Web APIs
Web › API › Index
isteners for them. 1274 EventTarget() API, Constructor, DOM, DOM Events, EventTarget The EventTarget() constructor creates a new EventTarget object instance. ...
...dEventListener() API, AccessOuterData, DOM, Detecting Events, Event Handlers, Event Listener, EventTarget, JavaScript, Method, PassingData, Receiving Events, Reference, addEventListener, attachEvent, events, mselementresize The EventTarget method addEventListener() sets up a function that will be called whenever the specified event is delivered to the target. 1276 EventTarget.attachEvent() No summary! 1277 EventTarget.dispatchEvent() API, DOM, DOM Element Methods, Gecko, Method Dispatches an Event at the specified EventTarget, (synchronously) invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEven...
Events and the DOM - Web APIs
Web › API › Document Object Model › Events
tton.addEventListener('click', greet, false) function greet(event){ // print and have a look at the event object // always print arguments in case of overlooking any other arguments console.log('greet:', arguments) alert('hello world') } This is the method you should use in modern web pages. Note: Internet Explorer 6-8 didn't support this method, offering a similar EventTarget.attachEvent API instead. For cross-browser compatibility, use one of the many JavaScript libraries available. More details can be found on the EventTarget.addEventListener reference page. HTML attribute <button onclick="alert('Hello world!')"> The JavaScript code in the attribute is passed the Event object via the event parameter. The return value is treated in a special way, described in the HTML spec...
Element.classList - Web APIs
Web › API › Element › classList
}); defineProperty(ele, " uCLp", { // for accessing the hidden prototype enumerable: 0, configurable: 0, writeable: 0, value: protoObj.prototype }); defineProperty(protoObjProto, " uCL", { enumerable: 0, configurable: 0, writeable: 0, value: ele }); } else { ele.classList=resTokenList, ele[" uCL"]=resTokenList, ele[" uCLp"]=protoObj.prototype; } ele.attachEvent( "onpropertychange", whenPropChanges ); } try { // Much faster & cleaner version for IE8 & IE9: // Should work in IE8 because Element.prototype instanceof Node is true according to the specs window.Object.defineProperty(window.Element.prototype, "classList", { enumerable: 1, get: function(val){ if (!hasOwnProp.call(this, "clas...
window.location - Web APIs
Web › API › Window › location
th.round(_scrollX + (_nodeX - _scrollX) * _itFrame / nFrames); if (_useHash && _itFrame === nFrames) { location.hash = _bookMark; } _itFrame++; } function _chkOwner () { if (_isBot) { _isBot = false; return; } if (_scrollId > -1) { clearInterval(_scrollId); _scrollId = -1; } } if (window.addEventListener) { window.addEventListener("scroll", _chkOwner, false); } else if (window.attachEvent) { window.attachEvent("onscroll", _chkOwner); } return function (sBookmark, bUseHash) { var oNode = document.querySelector(sBookmark); _scrollY = document.documentElement.scrollTop; _scrollX = document.documentElement.scrollLeft; _bookMark = sBookmark; _useHash = bUseHash === true; _nodeX = oNode.offsetLeft; _nodeY = oNode.offsetTop; _itFrame = 1; if (_scrollId === -1) ...