CN102654831A - Device and method for intensively controlling WEB page event and state - Google Patents
Device and method for intensively controlling WEB page event and state Download PDFInfo
- Publication number
- CN102654831A CN102654831A CN2011100521560A CN201110052156A CN102654831A CN 102654831 A CN102654831 A CN 102654831A CN 2011100521560 A CN2011100521560 A CN 2011100521560A CN 201110052156 A CN201110052156 A CN 201110052156A CN 102654831 A CN102654831 A CN 102654831A
- Authority
- CN
- China
- Prior art keywords
- event
- control
- state
- incident
- state variable
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention provides a device and a method for intensively controlling a WEB page event and a state. The device for intensively controlling the WEB page event and the state comprises an event monitoring unit, a compound event generating unit, an event distributing unit and a state managing unit, wherein the event monitoring unit is used for obtaining a browser event and the browser event is an event captured from a browser file object or an event submitted by a control module request; the compound event generating unit is used for reading a state variable from a state storage and generating a compound event according to the state variable and the browser event; the event distributing unit is used for sending the browser event or the compound event to a corresponding control to be processed; and the state managing unit is used for updating a record of the state variable in the state storage. According to the invention, the intensive management on events on a framework layer is realized, so that a mechanism which takes single control as a unit to carry out event management is avoided; the condition that a developer needs to define a set of event processing flow to each control is avoided and the working difficulty of the developer is well relieved; and meanwhile, a code amount of the whole system is reduced and the operation efficiency of the system can be improved.
Description
[technical field]
The present invention relates to the WEB development field, the apparatus and method of particularly a kind of centralized control WEB page events and state.
[background technology]
Along with WEB uses development more and more in depth, the exploitation of webpage also becomes increasingly complex on the website.Nowadays, can carry out mutual webpage with the user and be seen everywhere, and the realization of this function, depend on incident and the event processing mechanism of HTML just.
The operation that produces when user and webpage are mutual is called incident, and incident can be caused by the user, also possibly be the page triggerings that change, even also have the invisible incident of user (like the mutual progress change of Ajax).Overwhelming majority incidents are all caused by user's action, as: the user presses the button of mouse, just produces the click incident, is chaining mobilely as if the pointer of mouse, just produces mouseover incident or the like.
One of new features of HTML 4 are the behaviors that can make in the HTML Event triggered browser, for example when the user clicks certain html element element, start one section JavaScript.All be built-in with a large amount of event handlers in modern times in the browser; These processors can be kept watch on certain conditions or user behavior; For example accomplish in mouse-click or the browser window and load certain image; Through using the JavaScript of client, can add to specific label as attribute by the event handler that some is specific, and can when incident takes place, carry out one or more JavaScript orders or function.
In order to simplify developer's workload, the product of some framework levels has appearred in the front end exploitation of website at present, and for example existing Jquery widget library utilizes these widget libraries, and the developer can build user interface easily.Yet consider incident management mechanism; No matter being these widget libraries or browser itself, is that unit manages incident with single control all, does not have logical relation between control and the control; For example: say in logic from business; Control obtains focus (onfocus) and must be accompanied by another control and lose focus (onblur), but the incident management pattern in existing browser event management mode and the existing widget library product is all only carried out incident management to single control, promptly when a control obtains focus; And be indifferent to another control and whether lose focus; This is because browser event lacks the management of context (context) state, promptly isolates between incident and the incident, do not consider each incident and before or after incident between incidence relation; Therefore each control is safeguarded state-event separately respectively separately, and this mechanism usually is difficult to satisfy the complicated service demand.For example: when calendar shows, click non-calendar zone, need to hide the calendar zone, traditional way must be monitored the click event of the page, obtain incident after, whether the decision event trigger point in the calendar zone, is not then hiding the calendar zone.That is to say; No matter be any control, want to realize identical service logic (promptly hiding), all must carry out above-mentioned sequence of operations to this control; This way has increased developer's workload undoubtedly; Owing to, produced the code of a lot of repetitions, also reduced the efficient of operation simultaneously to identical service logic.
[summary of the invention]
Technical matters to be solved by this invention is to reduce developer's development difficulty, reduces developer's workload, the efficient of raising system operation.
The technical scheme that the present invention adopts for the technical solution problem has provided the device of a kind of centralized control WEB page events and state; Comprise: the action listener unit; Be used to obtain browser event, said browser event is the incident that the incident of catching from the browser document object or control module request are submitted to; The compound event generation unit is used for from status register reading state variable, and according to said state variable and said browser event, generates compound event; The incident Dispatching Unit is used for that said browser event and said compound event are distributed to corresponding controls and handles; The condition managing unit is used to upgrade the record of state variable described in the said status register.
The preferred implementation one of according to the present invention, said state variable further comprises the state variable of incident, the state variable of control, the state variable of mouse and the state variable of keyboard.
The preferred implementation one of according to the present invention, the state variable of said incident further comprise be used to write down before the said browser event that exerts an influence of the generation that takes place of one or more moment or the variable of said compound event to next one compound event constantly.
The preferred implementation one of according to the present invention, the state variable of said control further comprise and are used to write down the current control that is activated, the current control that is pressed, the current control that is pulled, current by the control of convergent-divergent and the current variable that is in the control in the choice box scope.
The preferred implementation one of according to the present invention, the state variable of said mouse further comprise and are used to write down the whether variable of conductively-closed and the residing coordinate of current mouse of current click.
The preferred implementation one of according to the present invention, said compound event further comprises browser self improvement incident that do not have or incomplete incident.
The preferred implementation one of according to the present invention, said compound event further is included in the one group of incident that triggers on the relevant control of event source control.
The preferred implementation one of according to the present invention, said condition managing unit also is used to receive and respond the request of said control module, when successful request, changes the record of the said state variable in the said status register according to described request.
The present invention also provides the method for a kind of centralized control WEB page events and state, and comprising: a. obtains browser event, and said browser event is the incident that the incident of catching from the browser document object or control module request are submitted to; B., generate compound event from said status register reading state variable, and according to said state variable and said browser event; C. said browser event or said compound event being distributed to corresponding controls handles; D. upgrade the record of state variable described in the said status register.
According to a preferred implementation of the present invention, said state variable further comprises the state variable of incident, the state variable of control, the state variable of mouse and the state variable of keyboard.
According to a preferred implementation of the present invention, the state variable of said incident further comprise be used to write down before the variable of the incident that exerts an influence of the generation that takes place of one or more moment to compound event.
According to a preferred implementation of the present invention, the state variable of said control further comprises and is used to write down the current control that is activated, the current control that is pressed, the current control that is pulled, current by the control of convergent-divergent and the current variable that is in the control in the choice box scope.
According to a preferred implementation of the present invention, the state variable of said mouse further comprises and is used to write down the whether variable of conductively-closed and the residing coordinate of current mouse of current click.
According to a preferred implementation of the present invention, said compound event further comprises browser self improvement incident that do not have or incomplete incident.
According to a preferred implementation of the present invention, said compound event further is included in the one group of incident that triggers on the relevant control of event source control.
According to a preferred implementation of the present invention, said method also comprises the request that receives said control module, changes the record of the said state variable in the said status register according to described request in described request when success.
Can find out by above technical scheme,, consider incident and incident through introducing concentrated condition managing; Incident and control, the logical communication link between control and the control, and generate corresponding compound event; Can realize on the framework aspect centralized management to incident; Thereby having broken away from single control is the mechanism that unit carries out incident management, avoids the developer to be directed against each control and all must definition one overlap the event handling flow process, has alleviated developer's work difficulty well; Also reduce simultaneously the size of code of total system, can improve the operational efficiency of system.
[description of drawings]
Fig. 1 is centralized control WEB page events and the apparatus structure synoptic diagram of state in the embodiment of the invention;
Fig. 2 is part browser object model (BOM) structural representation in the embodiment of the invention;
Fig. 3 is centralized control WEB page events and the method flow synoptic diagram of state in the embodiment of the invention.
[embodiment]
In order to make the object of the invention, technical scheme and advantage clearer, describe the present invention below in conjunction with accompanying drawing and specific embodiment.
Please refer to Fig. 1, Fig. 1 is the apparatus structure synoptic diagram of centralized control WEB page events and state.The device of centralized control WEB page events and state comprises: action listener unit 101, compound event generation unit 102, incident Dispatching Unit 103 and condition managing unit 104.
Action listener unit 101 is used to obtain browser event, and said browser event is the incident that the incident of catching from browser document object (Document) or control module request are submitted to.
According to browser object model (BOM), browser object has tree-shaped result, and is as shown in Figure 2, is part browser object model structure synoptic diagram.The Document object has been represented whole html document, and according to the event processing mechanism of browser, if do not stop the propagation of incident, incident can be from the source node object bubbling successively that takes place, up to root node.HTML code for example:
On an a label and body label, registered a click action listener function respectively; Owing in the action listener function of a label, do not stop the propagation of incident; Therefore the click incident can upwards be propagated; Like this, when user's clickable hyperlinks, will distinguish and show a warning window and body warning window in order.Therefore, in the present invention, for incident is carried out centralized control, event can be caught from the Document object in the action listener unit, to carry out follow-up processing.
But the service logic that has need locate to stop the incident bubbling certain DOM node (being certain label), for example in the monitoring function of certain label, stops the propagation of incident, will cause the Document object can't capturing events like this.In order to address this problem; When the present invention needs to stop event propagation at control (being the encapsulation of DOM node), can be before the cancellation event propagation, the request of sending the submission incident by control module to this device; Therefore, the action listener unit also is used to receive the incident that the control module request is submitted to.
Said process can be described below through false code:
Compound event generation unit 102 is used for from status register reading state variable, and according to the browser event described in state variable and the action listener unit 101, generates compound event.If the value of state variable has determined need not generate compound event, then do not produce compound event.
Compound event mainly is meant browser self improvement incident that do not have or incomplete incident, is also included within the one group of incident that triggers on the relevant control of event source control.The former for example activates burnt (onblur) incident of (onfocus)/mistake, in traditional browser event pattern, has only the list element could trigger the onfocus/onblur incident, and in the present invention, will activate/lose burnt conceptual expansion on all controls.The latter mainly is meant the incident of having considered the control set membership, in traditional browser event pattern, if control B is the child control of control A; The onfocus of B causes the onblur of A possibly; This does not meet applied logic, and in the present invention, if set membership is arranged between the control; On father's control/child control, take place so in the incident, can on child control/father's control, also trigger the incident that meets applied logic.
Typical compound event and affair logic thereof mainly contain:
1. show (onshow)/hide (onhide): the demonstration of control receives the demonstration/hiding influence of its related father's control and triggers with hiding.
2. activate (onfocus)/lose burnt (onblur): when mouse triggers the mousedown incident; Obtain current incident corresponding controls takes place, suppose that this control is A, if in no control regions; Corresponding controls is NULL; The current control that is activated is assumed to be B, and then control B and his father's control will trigger the onblur incident, and control A and his father's control will trigger the onfocus incident.If certain control need successively trigger onblur and onfocus in this stage, will not operate.
After the onfocus/onblur incident has been arranged, click the operation that non-calendar zone needs to hide the calendar zone in the prior art, just only need in the onblur event handling function, add the service code of hiding calendar control.Likewise, other any controls will have the business demand of similar logic, can write a cover decision logic again again, only need in the onblur event handling function, add the service code of hiding oneself.
3. mouse immigration (onmouseover)/shift out (onmouseout): in traditional browser event pattern; When moving into from father's control toward its child control; Father's control also shifts out incident with generation; Therefore this does not meet general service logic, directly ignores primary onmouseout incident in the present invention, and compound generation meets the onmouseout incident of general business logic in onmouseover.
4. pull (ondrag****)/convergent-divergent (onzoom****)/selection (onselect****): * * * * comprises start, move, end.When left mouse button was clicked, through the api interface that this device provides, control module can be sent request to this device; This device is set to special state; At this moment, will produce corresponding ondragmove/onzoommove/onselectmove incident with mouse moving, when left mouse button is upspring; This device will be removed relevant special state, and it is normal that the mouse moving event recovers.
Among the present invention; State to all is managed concentratedly, for this reason, has a status register to preserve one group of state variable in the present invention; Comprise the state variable of incident, the state variable of control, the state variable of mouse and the state variable of keyboard, be used to write down various states.
The state variable of incident mainly be used to write down before the browser event that exerts an influence of the generation that takes place of one or more moment or the variable of compound event to next one compound event constantly.
The state variable of control mainly comprises and is used to write down the current control that is activated, the current being pressed/control that unclamps, the current control that is pulled, current by the control of convergent-divergent and the current variable that is in the control in the choice box scope.Current being activated refers to left mouse button and in control regions, clicks, current be pressed refer to mouse press on the control do not upspring before, the current released mouse that refers to is upspring on control.
Why current being pressed/unclamp this state needs record; Be because some control need be arranged to certain special state when mouse is pushed, and when mouse up, remove this state, and can allow the incident of unclamping and the incident of pushing to occur on the different controls; For example when mouse is pushed on control A; Control A is set to special state, and when mouse moves to control B place when unclamping, the special state of control A is released.Such applied logic is difficult to realize that because when the special state of control A is released, the mouseup incident has occurred on the different controls with common mousedown incident and mouseup incident; Therefore on control A, just be difficult to get access to the state of mouse up; In order to address this problem, can utilize the such state variable of control of current being pressed/unclamp, generate compound event pressstart/pressend; Like this; In the above example, the special state of A just can be set in the pressstart of control A event handling function, in the pressend of control A event handling function, remove the special state of A.Be described below with false code:
The state variable of mouse mainly comprises and is used to write down the whether variable of conductively-closed and the residing coordinate of current mouse of current click.The click conductively-closed refers to the click information that ignores mouse.If click conductively-closed, the click of mouse on control at this moment just can not cause the activation of this control.This state needs when putting the roof window body to use at combobox.The residing coordinate variable of current mouse; Be for the coordinate that is used for writing down current mouse; This is because for some incident; Can't directly get access to mouse coordinates, also can have access to the position of mouse, just need a variable that writes down the residing coordinate of current mouse in order to make these incidents through browser interface.
The state variable of keyboard mainly is to be used for being recorded in the key value that gets access to when keyboard is pressed.This is because by next button the time; To trigger keydown and keypress incident successively; If what press just in time is function key (being the F1 to F12 on the keyboard, directionkeys etc.), in the keypress incident, can not get access to key value so; If therefore want in the keypress incident, to obtain the value of function key, write down this value with regard to the state variable that needs a keyboard so.In addition; Because this state variable arranged, when keydown and keyup take place in pairs, if change (being that variation has taken place current control) has taken place the state variable of control; Then can judge and to trigger a compound event by (comprise press and upspring) certain button; It is quite obvious, and when keydown and keyup occurred on the different keys, nature should not be regarded as it to occur on the same key to be handled; When this occurred in different positions with mousedown and mouseup, the reason that just should not generate a click incident was consistent.
Incident Dispatching Unit 103 is used for that the compound event described in browser event described in the action listener unit 101 or the compound event generation unit 102 is distributed to corresponding controls and handles.
Condition managing unit 104 is used for the record of update mode storer state variable.
After obtaining browser event or generating compound event, need the value of various state variables be upgraded preservation, the calculating that generates for compound event next time provides foundation.
For example in this state variable of the current mouse of the record coordinate of living in described in the compound event generation unit, it transmits through the mousemove incident, promptly obtain the mousemove incident after, should correspondingly upgrade the residing coordinate variable value of current mouse.For example can obtain the state variable that the function key assignments provides foundation for the keypress incident described in the compound event generation unit again, transmit through the keydown incident, promptly obtain the kevdown incident after, should correspondingly upgrade the state variable value of keyboard.
In addition, because this device provides the api interface of developing usefulness to control module, when the developer calls these api interfaces; Can send request to this device, this device is set to some special state, if successful request; The value of some state variable in the status register will correspondingly be changed in the condition managing unit, like this, and when the calculating that next step compound event generates; Value according to these state variables; Will produce the compound event that meets business demand, so the condition managing unit also is used to receive the request of control module, when successful request, changes the record of the state variable in the status register according to request.
The implementation of said apparatus is described with concrete embodiment below:
Embodiment one:
For control A, it can carry out drag operation business need.At this moment at first on A, carried out the mouse push; The action listener elements capture is to the mousedown incident; The incident Dispatching Unit is distributed to control A with the mousedown incident; Because control A can carry out drag operation, so sending to this device, control A pulls (drag) request in the mousedown event handling function, this process can be of following false code:
If successful request; The condition managing unit will change the record of corresponding state variable in the status register, make this device get into special drag pattern, and at this moment the mouse move operation takes place on A; The action listener elements capture is to mousemove; The compound event generation unit generates the dragmove incident according to the record of state variable, and the incident Dispatching Unit is distributed to control A with the dragmove incident.The mouse operation of upspringing takes place on A at last; The action listener elements capture is to mouseup; The incident generation unit generates the dragend incident according to the record of state variable, and the incident Dispatching Unit is distributed to control A with dragend, and the condition managing unit changes the record of corresponding state variable in the status register; Remove the drag pattern of this device, last incident Dispatching Unit is distributed to control A with the mouseup incident.
Above-mentioned explanation is expressed as with simple process flow: mouse down operation-->device is notified control to trigger and is combined into dragmove--after mousedown incident-->control notifying device need pull-->all mousemove course of event processing>mouse up operation-->device notifies control to trigger dragend, and releasing pulls--device notice control triggering mouseup incident.
Embodiment two:
Exist A, two controls of B; The B control is the control of current activation, and the mouse push has taken place on the A control this moment, and the action listener elements capture is to the mousedown incident; The compound event generation unit generates the onblur/onfocus incident according to state variable; The incident Dispatching Unit will successively send the mousedown incident to the A control, send the onblur incident to B control and his father's control, send the onfocus incident to A control and his father's control; The record of the state variable in the condition managing unit change status register changes the control of current activation into A.
Please refer to Fig. 3, Fig. 3 is the method flow synoptic diagram of centralized control WEB page events and state.The method of centralized control WEB page events and state comprises:
Step 201: obtain browser event, said browser event is the incident that the incident of catching from the browser document object or control module request are submitted to.
According to browser object model (BOM), browser object has tree-shaped result, and is as shown in Figure 2, is part browser object model structure synoptic diagram.The Document object has been represented whole html document, and according to the event processing mechanism of browser, if do not stop the propagation of incident, incident can be from the source node object bubbling successively that takes place, up to root node.HTML code for example:
On an a label and body label, registered a click action listener function respectively; Owing in the action listener function of a label, do not stop the propagation of incident; Therefore the click incident can upwards be propagated; Like this, when user's clickable hyperlinks, will distinguish and show a warning window and body warning window in order.Therefore, in the present invention, for incident is carried out centralized control, at first to catch event, to carry out follow-up processing from the Document object.
But the service logic that has need locate to stop the incident bubbling certain DOM node (being certain label), for example in the monitoring function of certain label, stops the propagation of incident, will cause the Document object can't capturing events like this.In order to address this problem, when the present invention needs to stop event propagation at control (being the encapsulation of DOM node), can before the cancellation event propagation,, at this moment need receive the incident that the control module request is submitted to by the request that control module is sent the submission incident.
Said process can be described below through false code:
Step 202:, and, generate compound event according to the browser event described in state variable and the step 201 from status register reading state variable.If the value of state variable has determined need not generate compound event, then do not produce compound event.
Compound event mainly is meant browser self improvement incident that do not have or incomplete incident, is also included within the one group of incident that triggers on the relevant control of event source control.The former for example activates burnt (onblur) incident of (onfocus)/mistake, in traditional browser event pattern, has only the list element could trigger the onfocus/onblur incident, and in the present invention, will activate/lose burnt conceptual expansion on all controls.The latter mainly is meant the incident of having considered the control set membership, in traditional browser event pattern, if control B is the child control of control A; The onfocus of B causes the onblur of A possibly; This does not meet applied logic, and in the present invention, if set membership is arranged between the control; On father's control/child control, take place so in the incident, can on child control/father's control, also trigger the incident that meets applied logic.
Typical compound event and affair logic thereof mainly contain:
1. show (onshow)/hide (onhide): the demonstration of control receives the demonstration/hiding influence of its related father's control and triggers with hiding.
2. activate (onfocus)/lose burnt (onblur): when mouse triggers the mousedown incident; Obtain current incident corresponding controls takes place, suppose that this control is A, if in no control regions; Corresponding controls is NULL; The current control that is activated is assumed to be B, and then control B and his father's control will trigger the onblur incident, and control A and his father's control will trigger the onfocus incident.If certain control need successively trigger onblur and onfocus in this stage, will not operate.
After the onfocus/onblur incident has been arranged, click the operation that non-calendar zone needs to hide the calendar zone in the prior art, just only need in the onblur event handling function, add the service code of hiding calendar control.Likewise, other any controls will have the business demand of similar logic, can write a cover decision logic again again, only need in the onblur event handling function, add the service code of hiding oneself.
3. mouse immigration (onmouseover)/shift out (onmouseout): in traditional browser event pattern; When moving into from father's control toward its child control; Father's control also shifts out incident with generation; Therefore this does not meet general service logic, directly ignores primary onmouseout incident in the present invention, and compound generation meets the onmouseout incident of general business logic in onmouseover.
4. pull (ondrag****)/convergent-divergent (onzoom****)/selection (onselect****): * * * * comprises start, move, end.When left mouse button was clicked, through the api interface that this device provides, control module can be sent request to this device; This device is set to special state; At this moment, will produce corresponding ondragmove/onzoommove/onselectmove incident with mouse moving, when left mouse button is upspring; This device will be removed relevant special state, and it is normal that the mouse moving event recovers.
Among the present invention; State to all is managed concentratedly, for this reason, has a status register to preserve one group of state variable in the present invention; Comprise the state variable of incident, the state variable of control, the state variable of mouse and the state variable of keyboard, be used to write down various states.
The state variable of incident mainly be used to write down before the browser event that exerts an influence of the generation that takes place of one or more moment or the variable of compound event to next one compound event constantly.
The state variable of control mainly comprises and is used to write down the current control that is activated, the current being pressed/control that unclamps, the current control that is pulled, current by the control of convergent-divergent and the current variable that is in the control in the choice box scope.Current being activated refers to left mouse button and in control regions, clicks, current be pressed refer to mouse press on the control do not upspring before, the current released mouse that refers to is upspring on control.
Why current being pressed/unclamp this state needs record; Be because some control need be arranged to certain special state when mouse is pushed, and when mouse up, remove this state, and can allow the incident of unclamping and the incident of pushing to occur on the different controls; For example when mouse is pushed on control A; Control A is set to special state, and when mouse moves to control B place when unclamping, the special state of control A is released.Such applied logic is difficult to realize that because when the special state of control A is released, the mouseup incident has occurred on the different controls with common mousedown incident and mouseup incident; Therefore on control A, just be difficult to get access to the state of mouse up; In order to address this problem, can utilize the such state variable of control of current being pressed/unclamp, generate compound event pressstart/pressend; Like this; In the above example, the special state of A just can be set in the pressstart of control A event handling function, in the pressend of control A event handling function, remove the special state of A.Be described below with false code:
The state variable of mouse mainly comprises and is used to write down the whether variable of conductively-closed and the residing coordinate of current mouse of current click.The click conductively-closed refers to the click information that ignores mouse.If click conductively-closed, the click of mouse on control at this moment just can not cause the activation of this control.This state needs when putting the roof window body to use at combobox.The residing coordinate variable of current mouse; Be for the coordinate that is used for writing down current mouse; This is because for some incident; Can't directly get access to mouse coordinates, also can have access to the position of mouse, just need a variable that writes down the residing coordinate of current mouse in order to make these incidents through browser interface.
The state variable of keyboard mainly is to be used for being recorded in the key value that gets access to when keyboard is pressed.This is because by next button the time; To trigger keydown and keypress incident successively; If what press just in time is function key (being the F1 to F12 on the keyboard, directionkeys etc.), in the keypress incident, can not get access to key value so; If therefore want in the keypress incident, to obtain the value of function key, write down this value with regard to the state variable that needs a keyboard so.In addition; Because this state variable arranged, when keydown and keyup take place in pairs, if change (being that variation has taken place current control) has taken place the state variable of control; Then can judge and to trigger a compound event by (comprise press and upspring) certain button; It is quite obvious, and when keydown and keyup occurred on the different keys, nature should not be regarded as it to occur on the same key to be handled; When this occurred in different positions with mousedown and mouseup, the reason that just should not generate a click incident was consistent.
Step 203: the compound event described in browser event described in the step 201 or the step 202 is distributed to corresponding controls handles.
Step 204: the record of state variable in the update mode storer.
After obtaining browser event or generating compound event, need the value of various state variables be upgraded preservation, the calculating that generates for compound event next time provides foundation.
For example in this state variable of the current mouse of the record coordinate of living in described in the compound event generation unit, it transmits through the mousemove incident, promptly obtain the mousemove incident after, should correspondingly upgrade the residing coordinate variable value of current mouse.For example can obtain the state variable that the function key assignments provides foundation for the keypress incident described in the compound event generation unit again, transmit through the keydown incident, promptly obtain the keydown incident after, should correspondingly upgrade the state variable value of keyboard.
In addition, this method further comprises step 205: receive the request that response control module is also sent, when successful request, change the record of the state variable in the status register according to request.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.
Claims (16)
1. the device of centralized control WEB page events and state is characterized in that said device comprises:
The action listener unit is used to obtain browser event, and said browser event is the incident that the incident of catching from the browser document object or control module request are submitted to;
The compound event generation unit is used for from status register reading state variable, and according to said state variable and said browser event, generates compound event;
The incident Dispatching Unit is used for that said browser event or said compound event are distributed to corresponding controls and handles;
The condition managing unit is used to upgrade the record of state variable described in the said status register.
2. the device of centralized control WEB page events according to claim 1 and state is characterized in that, said state variable further comprises the state variable of incident, the state variable of control, the state variable of mouse and the state variable of keyboard.
3. the device of centralized control WEB page events according to claim 2 and state; It is characterized in that, the state variable of said incident further comprise be used to write down before the said browser event that exerts an influence of the generation that takes place of one or more moment or the variable of said compound event to the next one said compound event constantly.
4. the device of centralized control WEB page events according to claim 2 and state; It is characterized in that the state variable of said control further comprises and is used to write down the current control that is activated, the current control that is pressed, the current control that is pulled, current by the control of convergent-divergent and the current variable that is in the control in the choice box scope.
5. the device of centralized control WEB page events according to claim 2 and state is characterized in that, the state variable of said mouse further comprises and is used to write down the whether variable of conductively-closed and the residing coordinate of current mouse of current click.
6. the device of centralized control WEB page events according to claim 1 and state is characterized in that, said compound event further comprises browser self improvement incident that do not have or incomplete incident.
7. the device of centralized control WEB page events according to claim 1 and state is characterized in that, said compound event further is included in the one group of incident that triggers on the relevant control of event source control.
8. the device of centralized control WEB page events according to claim 1 and state; It is characterized in that; Described condition managing unit also is used to receive and respond the request of said control module, changes the record of the said state variable in the said status register according to described request in described request when success.
9. the method for centralized control WEB page events and state is characterized in that said method comprises step:
A. obtain browser event, said browser event is the incident that the incident of catching from the browser document object or control module request are submitted to;
B., generate compound event from status register reading state variable, and according to said state variable and said browser event;
C. said browser event or said compound event being distributed to corresponding controls handles;
D. upgrade the record of state variable described in the said status register.
10. the method for centralized control WEB page events according to claim 9 and state is characterized in that, said state variable further comprises the state variable of incident, the state variable of control, the state variable of mouse and the state variable of keyboard.
11. the method for centralized control WEB page events according to claim 10 and state; It is characterized in that, the state variable of said incident further comprise be used to write down before the said browser event that exerts an influence of the generation that takes place of one or more moment or the variable of said compound event to the next one said compound event constantly.
12. the method for centralized control WEB page events according to claim 10 and state; It is characterized in that the state variable of said control further comprises and is used to write down the current control that is activated, the current control that is pressed, the current control that is pulled, current by the control of convergent-divergent and the current variable that is in the control in the choice box scope.
13. the method for centralized control WEB page events according to claim 10 and state is characterized in that, the state variable of said mouse further comprises and is used to write down the whether variable of conductively-closed and the residing coordinate of current mouse of current click.
14. the method for centralized control WEB page events according to claim 9 and state is characterized in that, said compound event further comprises browser self improvement incident that do not have or incomplete incident.
15. the method for centralized control WEB page events according to claim 9 and state is characterized in that, said compound event further is included in the one group of incident that triggers on the relevant control of event source control.
16. the method for centralized control WEB page events according to claim 9 and state; It is characterized in that; Said method also comprises the request that receives and respond said control module, when the described request success, changes the record of the said state variable in the said status register according to described request.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100521560A CN102654831A (en) | 2011-03-04 | 2011-03-04 | Device and method for intensively controlling WEB page event and state |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100521560A CN102654831A (en) | 2011-03-04 | 2011-03-04 | Device and method for intensively controlling WEB page event and state |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102654831A true CN102654831A (en) | 2012-09-05 |
Family
ID=46730457
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011100521560A Pending CN102654831A (en) | 2011-03-04 | 2011-03-04 | Device and method for intensively controlling WEB page event and state |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102654831A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425775A (en) * | 2013-08-14 | 2013-12-04 | 北京网秦天下科技有限公司 | Method and device for determining corresponding processing according to event collection correlated with webpages |
CN105517110A (en) * | 2015-11-24 | 2016-04-20 | 飞天诚信科技股份有限公司 | Method and apparatus for connecting bluetooth device |
CN107508697A (en) * | 2017-07-17 | 2017-12-22 | 武汉微摇科技文化有限公司 | A kind of monitoring system and method for the interactive page |
CN110018867A (en) * | 2018-11-12 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Method and apparatus for page interaction |
CN110362309A (en) * | 2019-07-23 | 2019-10-22 | 深圳前海微众银行股份有限公司 | Front end project development method, apparatus, equipment and computer readable storage medium |
CN110611713A (en) * | 2019-09-17 | 2019-12-24 | 深圳市网心科技有限公司 | Data downloading method and system, electronic equipment and storage medium |
US10705676B2 (en) | 2015-01-23 | 2020-07-07 | Xiaomi Inc. | Method and device for interacting with button |
CN111563219A (en) * | 2020-04-20 | 2020-08-21 | 北京明略软件系统有限公司 | State management method and device for web application |
CN111767042A (en) * | 2020-05-18 | 2020-10-13 | 福建天泉教育科技有限公司 | Method and terminal for realizing check in drop-down box |
CN115203618A (en) * | 2022-09-13 | 2022-10-18 | 北京达佳互联信息技术有限公司 | Page processing method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1519722A (en) * | 2003-01-20 | 2004-08-11 | 鼎新电脑股份有限公司 | System and method for processing events on java web page |
CN1641588A (en) * | 2004-01-08 | 2005-07-20 | 英业达股份有限公司 | Method for transmitting events between Java assemblies |
CN101621408A (en) * | 2008-07-04 | 2010-01-06 | 阿尔卡特朗讯 | Method for monitoring events in a communication network |
CN101685451A (en) * | 2008-09-27 | 2010-03-31 | 国际商业机器公司 | Method for monitoring events in browser, event monitoring device and browser equipment |
-
2011
- 2011-03-04 CN CN2011100521560A patent/CN102654831A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1519722A (en) * | 2003-01-20 | 2004-08-11 | 鼎新电脑股份有限公司 | System and method for processing events on java web page |
CN1641588A (en) * | 2004-01-08 | 2005-07-20 | 英业达股份有限公司 | Method for transmitting events between Java assemblies |
CN101621408A (en) * | 2008-07-04 | 2010-01-06 | 阿尔卡特朗讯 | Method for monitoring events in a communication network |
CN101685451A (en) * | 2008-09-27 | 2010-03-31 | 国际商业机器公司 | Method for monitoring events in browser, event monitoring device and browser equipment |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425775A (en) * | 2013-08-14 | 2013-12-04 | 北京网秦天下科技有限公司 | Method and device for determining corresponding processing according to event collection correlated with webpages |
US10705676B2 (en) | 2015-01-23 | 2020-07-07 | Xiaomi Inc. | Method and device for interacting with button |
CN105517110A (en) * | 2015-11-24 | 2016-04-20 | 飞天诚信科技股份有限公司 | Method and apparatus for connecting bluetooth device |
CN105517110B (en) * | 2015-11-24 | 2019-03-29 | 飞天诚信科技股份有限公司 | A kind of method and device connecting bluetooth equipment |
CN107508697A (en) * | 2017-07-17 | 2017-12-22 | 武汉微摇科技文化有限公司 | A kind of monitoring system and method for the interactive page |
CN110018867A (en) * | 2018-11-12 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Method and apparatus for page interaction |
CN110362309B (en) * | 2019-07-23 | 2023-09-08 | 深圳前海微众银行股份有限公司 | Front-end project development method, device, equipment and computer readable storage medium |
CN110362309A (en) * | 2019-07-23 | 2019-10-22 | 深圳前海微众银行股份有限公司 | Front end project development method, apparatus, equipment and computer readable storage medium |
CN110611713A (en) * | 2019-09-17 | 2019-12-24 | 深圳市网心科技有限公司 | Data downloading method and system, electronic equipment and storage medium |
CN111563219A (en) * | 2020-04-20 | 2020-08-21 | 北京明略软件系统有限公司 | State management method and device for web application |
CN111563219B (en) * | 2020-04-20 | 2023-10-20 | 北京明略软件系统有限公司 | State management method and device for web application |
CN111767042A (en) * | 2020-05-18 | 2020-10-13 | 福建天泉教育科技有限公司 | Method and terminal for realizing check in drop-down box |
CN115203618A (en) * | 2022-09-13 | 2022-10-18 | 北京达佳互联信息技术有限公司 | Page processing method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102654831A (en) | Device and method for intensively controlling WEB page event and state | |
US10642442B2 (en) | Software robots for programmatically controlling computer programs to perform tasks | |
US11200073B1 (en) | Automatic anchor determination and target graphical element identification in user interface automation | |
JP2022551833A (en) | Artificial intelligence-based process identification, extraction, and automation for robotic process automation | |
US9465726B2 (en) | Abstract layer for automatic user interface testing | |
US10261650B2 (en) | Window grouping and management across applications and devices | |
CN100530085C (en) | Method and apparatus for implementing a virtual push-to-talk function | |
CN112720452A (en) | Naming robot process automation activities according to automatically detected target tags | |
CN101553769A (en) | Method and system for tracking and monitoring computer applications | |
US11947443B2 (en) | Robotic process automation (RPA) debugging systems and methods | |
CN104246659A (en) | Instantiable gesture objects | |
US20230081074A1 (en) | Enhanced Target Selection for Robotic Process Automation | |
JP2009506465A (en) | Method and computer-readable medium for commanding | |
US20230004362A1 (en) | Code execution and data processing pipeline | |
CN101292226A (en) | Technique for thread communication and synchronization | |
JP2022552127A (en) | Artificial Intelligence Layer-Based Process Extraction for Robotic Process Automation | |
CN113032273B (en) | Application program debugging method and device, computer equipment and storage medium | |
CN115686470A (en) | Method and device for automatically generating Python script based on CAX software recording user operation | |
JP2023545253A (en) | Training artificial intelligence/machine learning models to recognize applications, screens, and user interface elements using computer vision | |
CN104160370A (en) | Image-based application automation | |
KR102363774B1 (en) | Automatic anchor determination and target graphic element identification in user interface automation | |
CN103034503A (en) | Script executing method, system and browser | |
WO2006114880A1 (en) | Information linkage window system | |
CN104598226A (en) | Chart interaction design method based on Flex | |
CN104267954A (en) | Generation method and device for units included in user interface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20120905 |