Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ On event processing browser compatibility notes     - Linux Log Clear (Linux)

- imp / exp Oracle Database import and export commands (Database)

- RHEL 6.6 install GNOME desktop environment (Linux)

- Oracle Standby Redo Log experiment (Database)

- Unable to start the network after restart clone a virtual machine (Linux)

- Monitoring services are running properly and will email alert (Server)

- Modern Objective-C syntax and new features (Programming)

- Unix system security configuration (Linux)

- Hadoop 0.23 compile common errors (Server)

- GlusterFS distributed storage deployment (Server)

- Linux kernel log --dmesg (Linux)

- Git Experience Sharing - Using a remote repository (Linux)

- C ++: Postmodern systems programming language (Programming)

- Linux + Apache + PHP + Oracle based environment to build (Server)

- Linux Network Programming - non-blocking program (Programming)

- CentOS 7 Test Marathon start Docker container (Server)

- Oracle 12c R2 new feature dbca command to create a standby database (Database)

- OpenCV cvFindCornerSubPix () to find sub-pixel Corner (Programming)

- Java threads and thread pools (Programming)

- Firewall Configuration Red Hat Enterprise Linux 4 (Linux)

  On event processing browser compatibility notes
  Add Date : 2018-11-21      
  Spit first few browser compatible slot, after all, this area has just learning, not alone to say. Most of the front end of the main development should be based on the Firefox browser, in addition to easy to use firebug, Firefox strict parsing is the main reason. In addition Safari, Opera, Chrome, IE is of course not be neglected major browsers that support W3C standards are not identical. Speaking of the main differences, IE can be considered as a class, the other classified as a class. Because IE is often a very different, not to mention Quirks mode.

1.Event objects

Event objects belong to HTML DOM, on behalf of the state of events. But IE Event objects are treated as property of the Window object, use of the Event object is cross-browser compatible way:

function eventHandleFunction (evnt) {
      var theEvent = evnt evnt:? window.event;
      // ...

2. Event bubbling

 Event bubbling is simply child elements of an event is triggered, by default the parent element's event will be triggered in succession. We want to stop event bubbling for Mozilla browsers stopPropagation method, and IE browser uses cancleBubble property. Prevent bubbling compatible wording is:

function stopEvent (evnt) {
    if (evnt.stopPropagation) {
          evnt.stopPropagation ();
    } Else {
          evnt.cancleBubble = true;

3. Add a listener function

 JavaScript provides three methods to achieve the object event listener: addEventListener, removeEventListener, dispatchEvent.

addEventListener usage:

obj.addEventListener ( 'event', eventFunction, boolean);

The third parameter is false, the form of bubbling event. Value is the opposite, that my late father son after anti-bubbling order of true.

But IE seems not the same, IE does not support the above method (I do not know the future will not support), a similar procedure is attachEvent, detachEvent. Compatible for event listener approach is:

if (obj.addEventListener) {
    obj.addEventListener ( "click", clickFunc, false);
} Else if (obj.attachEvent) {
    obj.attachEvent ( "onclick", clickFunc);
} Else {
    obj.onclick = clickFunc;
- Qt shared memory interprocess communication (Programming)
- Linux User Rights Study Notes (Linux)
- What is Unikernel? (Linux)
- How to configure a server in a MySQL Cluster (Database)
- 22 Port weak passwords and SSH connection program of the Linux server (Linux)
- Haproxy multi-domain certificate HTTPS (Server)
- Linux prohibit non-WHEEL user su command Detail (Linux)
- MySQL error: ERROR 1175: You are using safe update mode solution (Database)
- PL / SQL how to make the program every few seconds to insert a data (Database)
- First start with Kali Linux 2.0 (Linux)
- Linux Platform Oracle 11g Single Instance Installation Deployment Configuration Quick Reference (Database)
- Linux system versions organize local root password cracking method (Linux)
- Docker build private warehouse (Server)
- Oracle common internal event tracking number (Database)
- How to choose the correct HTTP status code (Server)
- Installation CD audio file extraction tool Flacon (Linux)
- Ubuntu upgrade to Linux Kernel 4.2.3 Kernel (Linux)
- JDK comes with tools jinfo (Linux)
- Transfer MySQL database to MariaDB (Database)
- Nonstandard IMP-00010 error processing one case (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.