Information processor, control method thereof, and program
The information processing device with an event handler generates a change event to ensure JavaScript execution, addressing the issue of non-execution in certain browser engines, thereby enhancing web browser usability.
Patent Information
- Application Number
- JP2024008779
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2025-08-05
AI Technical Summary
Some browser engines do not generate a change event after input into an input field is completed and the field is focused out, leading to JavaScript corresponding to the change event not being executed, which affects the usability of web browsers.
An information processing device that executes a web browser and an event handler, where the event handler generates a change event when a specified event is notified from the browser engine, ensuring compatibility across different browser engines.
Ensures the convenience and usability of the web browser by executing JavaScript corresponding to the change event, even when the browser engine does not generate the event itself.
Smart Images

Figure 2025114220000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an information processing device, a control method for an information processing device, and a program. [Background technology]
[0002] Some MFPs (Multi Function Peripherals, hereafter referred to as image forming devices), which are generally equipped with scanners, printers, etc., are also equipped with web browsers. Web browsers use a browser engine to execute and display scripts (generally referred to as JavaScript (registered trademark)) obtained from a server. The browser engine can generate a change event after input into an input field displayed in the web browser is completed and the input field is focused out. When the browser engine generates a change event, the web browser executes JavaScript corresponding to the change event. As an example, JavaScript provides a function to convert characters entered in an input field from lowercase to uppercase, improving the usability of web browsers.
[0003] In addition, there are multiple browser engines of different types or versions that web browsers use, so it is possible to change the browser engine of a web browser.
[0004] Patent Document 1 discloses a method for automatically generating and completing input information by detecting a specific event in an input field of a web browser. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Laid-Open No. 2008-225802 Summary of the Invention [Problem to be solved by the invention]
[0006] Some browser engines are not configured to generate a change event after input into an input field displayed on the web browser is completed and the input field is focused out. If a browser engine with such a configuration is introduced into the information input device described in Patent Document 1, there is a problem that JavaScript corresponding to the change event is not executed even if a specific event is detected.
[0007] An object of the present disclosure is to provide an information processing device that can ensure the convenience of a web browser. [Means for solving the problem]
[0008] An information processing device according to one embodiment of the present disclosure is an information processing device that executes a web browser and an event handler implemented on the web browser, and is characterized in that the event handler functions as a generating means for generating a change event when a specified event is notified from a browser engine. [Effects of the Invention]
[0009] According to the present disclosure, the convenience of the web browser can be ensured. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is an overall view showing an example of a system. [Figure 2] FIG. 1 is a block diagram showing an example of a configuration of an image forming apparatus. [Figure 3] FIG. 2 is a diagram illustrating an example of a program configuration of a web browser. [Figure 4] FIG. 10 is a diagram illustrating an example of a screen displayed by a web browser. [Figure 5] FIG. 10 is a sequence diagram illustrating an example of a flow in which a browser engine generates a change event. [Figure 6] FIG. 10 is a sequence diagram illustrating an example of a flow in which an event handler generates a change event. [Figure 7] 10 is a flowchart illustrating an example of a process executed by an event handler. [Figure 8] 10 is a flowchart illustrating an example of processing executed by a browser application. [Figure 9] FIG. 2 is a diagram illustrating an example of a program configuration of a web browser. [Figure 10] 10 is a flowchart illustrating an example of a process executed by an event handler. DETAILED DESCRIPTION OF THE INVENTION
[0011] Preferred embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Note that the following embodiments do not limit the scope of the present disclosure, and not all combinations of features described in the following embodiments are necessarily essential to the solutions of the present disclosure. Note that the same components will be described with the same reference numerals.
[0012] <<First embodiment>> 1 is an overall view showing an example of a system according to the first embodiment. The system comprises an image forming apparatus 101 and a server 102. The image forming apparatus 101 and the server 102 are connected to each other via a network 110 so that they can communicate with each other. The server 102 can use a plurality of different URLs to access.
[0013] 2 is a block diagram showing an example of the configuration of the image forming apparatus 101. The image forming apparatus 101 is made up of a control unit 210, an operation unit 220, a printer unit 230, and a scanner unit 240. The control unit 210 includes a CPU 211, a ROM 212, a RAM 213, an HDD 214, an operation unit interface (hereinafter referred to as I / F) 215, a printer I / F 216, a scanner I / F 217, and a network I / F 218.
[0014] A control unit 210 including a CPU 211 controls the overall operation of the image forming apparatus 101. The CPU 211 reads a control program stored in a ROM 212 into a RAM 213 and executes the read control program to realize various types of control, such as reading control and transmission control. The RAM 213 is used as a temporary storage area, such as the main memory and work area, of the CPU 211. The HDD 214 stores image data, various programs, and the like.
[0015] An operation unit I / F 215 connects the operation unit 220 and the control unit 210. The operation unit 220 is provided with a liquid crystal display unit with a touch panel function, various keys, etc. A printer I / F 216 connects the printer unit 230 and the control unit 210. Image data to be printed by the printer unit 230 is transferred from the control unit 210 to the printer unit 230 via the printer I / F 216. The transferred image data is printed on a recording medium in the printer unit 230.
[0016] The scanner I / F 217 connects the scanner unit 240 and the control unit 210. The scanner unit 240 reads an image on a document, generates image data, and inputs the image data to the control unit 210 via the scanner I / F 217.
[0017] The network I / F 218 connects the control unit 210 to the network 110. The user inputs the URL of the server 102 to be accessed into the input section of a web browser displayed on the liquid crystal display of the operation unit 220. The web browser sends a request via the network I / F 218 to the server 102 at the IP address obtained from the input URL. Upon receiving the request, the server 102 sends a response of the corresponding web content to the web browser. The web content response is generally written using HTML (Hyper Text Markup Language), CSS (Cascading Style Sheets), JavaScript (registered trademark), etc.
[0018] 3 is a diagram showing an example of the program configuration of the Web browser 300 of the image forming apparatus 101 in this embodiment. The Web browser 300 is composed of an event handler 310, a browser application 330, and a browser engine 340. The event handler 310 is a program that can be called from the browser engine 340 and is a program for performing specific processing in response to a predetermined event. The event handler 310 is also a program implemented on the Web browser. The browser engine 340 performs processing such as managing the user interface (UI) and parsing acquired Web content. The browser application 330 performs processing to display the parsed Web content received from the browser engine 340.
[0019] The event handler 310 includes a field identification unit 311, an event detection unit 312, a focus-in event determination unit 313, a focus-in event notification unit 314, a click event determination unit 315, and a click event notification unit 316. The event handler 310 includes a focus-out event determination unit 317, a change event generation unit 318, and a focus-out event notification unit 319.
[0020] The browser application 330 includes a field specification unit 331 , an event notification detection unit 332 , a focus-in event notification determination unit 333 , a click event notification determination unit 334 , a focus-out event notification determination unit 335 , and a change event generation unit 336 .
[0021] When the field identification unit 311 is notified by the browser engine 340 of an event for an input field being displayed on the web browser 300, the field identification unit 311 identifies the target input field. The event detection unit 312 detects that an event registered in advance in the browser engine 340 has been notified. A focus-in event, a click event, and a focus-out event will be described as examples of events to be detected.
[0022] In this specification, "focus-in" refers to a state in which the focus (generally a mouse pointer or the like) is placed in an input field. "Click" refers to a state in which the focused-in input field is selected. When the user enters a value into the input field while it is selected, the value of the input field is set. "Focus-out" refers to a state in which the focus is removed from the input field after the user has completed inputting data into the input field.
[0023] The focus-in event determination unit 313 determines whether the detected event is a focus-in event. The focus-in event notification unit 314 notifies the browser application 330 of the focus-in event.
[0024] The click event determination unit 315 determines whether the detected event is a click event. The click event notification unit 316 notifies the browser application 330 of the click event.
[0025] The focus-out event determination unit 317 determines whether the detected event is a focus-out event. The change event generation unit 318 generates a change event. Note that generating a change event may be expressed as "the change event being fired." By generating the change event, a JavaScript engine (not shown) executes JavaScript corresponding to the change event included in the Web content already acquired by the browser application 330. The focus-out event notification unit 319 notifies the browser application 330 of the focus-out event. Note that the configuration of the browser application 330 will be described in detail later.
[0026] <Example of browser engine raising change event> In this embodiment, an example of processing when the browser engine does not generate a change event will be described later, but to make it easier to understand, we will first describe an example in which the browser engine generates a change event as a comparative example.
[0027] FIG. 4 is a diagram showing an example of a screen displayed by the web browser 300 of the image forming apparatus 101. An example of a browser engine generating a change event will be described with reference to FIG. 4. FIG. 4(a) is a diagram showing a UI screen displayed after web content is acquired from the server 102. FIG. 4(a) includes an ID input field 400 for inputting authentication information for user authentication. The input field 400 is empty when web content is acquired (on the initial screen). A user can access a desired page by entering preset ID information into the input field 400. When a user enters ID information into the input field 400, the browser engine notifies the browser application of an event when the mouse pointer enters the input field 400 or the input field 400 is pressed by the user.
[0028] FIG. 4(b) is a diagram showing a UI screen when ID information is entered into the input field of FIG. 4(a). FIG. 4(b) shows a state in which the user has entered "user" in lowercase as ID information into the input field 401. When the input is completed and the focus is removed from the input field 401, the browser engine generates a change event. By generating a change event, the web browser 300 executes JavaScript corresponding to the change event. When JavaScript is executed, the characters in the input field 401 are converted from lowercase to uppercase. It is assumed that the web content includes JavaScript that converts characters from lowercase to uppercase in response to the generation of a change event after input into the input field is completed and the focus is removed.
[0029] 4(c) is a diagram showing a UI screen after ID information has been entered into the input field 401 in FIG. 4(b) and a change event has occurred after focus has been removed from the input field 401. The input field 402 shows a state in which the entered characters have been converted to uppercase "USER."
[0030] As described above, a browser engine configured to generate a change event after input into an input field displayed on the Web browser 300 is completed and the field is focused out has been described. Fig. 5 is a sequence diagram showing an example of a flow in which a browser engine configured in this manner generates a change event. The processing performed by the browser engine and browser application that generates a change event will be described with reference to Fig. 5.
[0031] In S501, the browser application acquires web content from the server. In S502, the browser application requests the browser engine to load and execute the web content acquired in S501. In S503, the browser engine receives a request to load and execute the web content from the browser application.
[0032] In S504, the browser engine loads and executes the Web content. In S805, the browser engine returns the rendering result of the loaded Web content (parsed Web content) to the browser application. In S506, the browser application displays the Web content on the liquid crystal display unit of the operation unit 220.
[0033] In S507, when the browser engine detects an operation by the user to focus in on an input field or the like displayed on the Web browser 300, it notifies the browser application of a focus-in event.
[0034] In S508, when the browser engine detects an operation by the user to click on an input field or the like displayed on the Web browser 300, it notifies the browser application of the click event.
[0035] In S509, upon receiving the notification of the click event, the browser application performs processing to display the soft keyboard. In S510, the user uses the soft keyboard to input a value into the input field displayed by the browser application.
[0036] In S511, the browser application passes the input value of the soft keyboard to the browser engine. In S512, the browser engine reflects the input value in the input field. Then, in S513, when the user completes the input operation, the browser engine generates an input completion event.
[0037] In S514, when the browser engine detects an operation by the user to remove focus from an input field or the like displayed on the Web browser 300 after S513, the browser engine generates a change event. Then, in S515, the browser engine notifies the browser application of a focus-out event. Note that the process of generating a change event by the browser engine is generally performed when a focus-out event is detected.
[0038] As mentioned above, when the focus out event is detected, the browser engine will fire a change event, which will cause the value entered in the input field to be changed from lowercase to uppercase, etc.
[0039] <Example of browser engine not firing change event> Some browser engines are not configured to generate a change event after focus-out. Next, the processing of a browser engine that is not configured to generate a change event after input into an input field displayed on Web browser 300 is completed and focus-out is performed will be described with reference to FIG.
[0040] As shown in Figure 4(b), even if the user enters "user" in lowercase in input field 401, the browser engine does not generate a change event. To prevent the change event from being generated, the web browser 300 does not execute JavaScript corresponding to the change event. As a result, as shown in Figure 4(c), the character is not converted to uppercase "USER" and remains in lowercase in input field 401.
[0041] <Example of an event handler raising a change event> 6 is a sequence diagram showing an example of a flow in which the event handler 310 in the present disclosure generates a change event. With reference to FIG. 6, the processing performed by the event handler 310, browser engine 340, and browser application 330 that generates a change event will be described.
[0042] In S601, the browser application 330 acquires Web content from a server. In S602, the browser application 330 requests the browser engine 340 to load and execute the Web content acquired in S601. In S603, the browser engine 340 receives a request from the browser application 330 to load and execute the Web content.
[0043] In S604, before loading the Web content, the browser engine 340 performs pre-load processing and calls the event handler 310. The pre-load processing is generally known as the processing of S605 and S606 performed by the event handler 310 and the browser engine 340, respectively. More specifically, the Web content includes a JavaScript description that causes the browser engine 340 to function as the event handler 310. In the pre-load processing, the browser engine 340 calls the event handler 310 based on this description.
[0044] In S605, the called event handler 310 registers notifications of focus-in, click, and focus-out events. That is, the event handler 310 registers a function for receiving notifications of each event from among multiple functions written in a predetermined JavaScript file located in a specific file path. The predetermined JavaScript file can be loaded into memory by the browser engine and can be prepared as an extension of the browser engine.
[0045] In S606, the browser engine 340 registers a handler for receiving event notifications of focus-in, click, and focus-out. That is, after receiving the function registered by the event handler 310, the browser engine 340 loads a predetermined JavaScript file into memory and registers the function as a handler for notifying the event handler 310 of the event.
[0046] In S607, the browser engine 340 loads and executes the Web content. In S608, the browser engine 340 returns the rendering result of the loaded Web content (parsed Web content) to the browser application 330. In S609, the browser application 330 displays the Web content on the liquid crystal display unit of the operation unit 220.
[0047] In S610, when the browser engine 340 detects a user's operation of focusing in on an input field or the like displayed in the web browser 300, it notifies the event handler 310 of a focus-in event. In S611, when the event handler 310 receives the focus-in event notification in S610, it notifies the browser application 330 of the focus-in event.
[0048] In S612, when the browser engine 340 detects a user's click on an input field or the like displayed on the Web browser 300, it notifies the event handler 310 of the click event. In S613, when the event handler 310 receives the click event notification in S612, it notifies the browser application 330 of a click-in event.
[0049] In S614, upon receiving the click event notification, the browser application 330 performs processing to display a soft keyboard. In S615, the user uses the soft keyboard to input a value into the input field displayed by the browser application 330.
[0050] In S616, the browser app 330 passes the input value of the soft keyboard to the event handler 310. In S617, the event handler 310 reflects the input value in the input field. Then, in S618, when the input operation by the user is completed, the event handler 310 generates an input completion event.
[0051] In S619, when the browser engine 340 detects an operation to remove focus from an input field or the like displayed on the web browser 300 by the user after S618, it notifies the event handler 310 of a focus out event.
[0052] In S620, when the event handler 310 receives the notification of the focus out event in S619, it generates a change event. In S621, the event handler 310 notifies the browser app 330 of the focus out event. In FIG. 5, it was explained that the process of the browser engine generating a change event is generally performed when a focus out event is detected. Regarding the process of the event handler 310 generating a change event, by performing it when a focus out event is detected, compatibility between browser engines can be maintained.
[0053] Thus, even for a browser engine that is not configured to generate a change event, the input value of the input field can be changed by the event handler generating a change event.
[0054] <Event Notification Processing of Event Handler During Web Content Display> FIG. 7 is a flowchart illustrating an example of processing executed by the event handler 310. Referring to FIG. 7, the following describes processing in which the event handler 310 detects an event in a specific input field and notifies the event while Web content is being displayed on the browser application 330 of the image forming apparatus 101 in this embodiment. The processing illustrated in FIG. 7 is implemented by the CPU 211 of the image forming apparatus 101 loading a program stored in the ROM 212 into the RAM 213 and executing the program. Note that some or all of the functions of the steps in FIG. 7 may be implemented by hardware such as an ASIC or electronic circuit. The symbol "S" in the description of each process indicates a step in the flowchart (the same applies to flowcharts throughout this specification). The processing illustrated in FIG. 7 begins when the user performs an operation on an input field displayed on the browser application 330, and the event handler 310 receives event information corresponding to the operation from the browser engine 340. The event information includes information indicating the input field that was the target of the operation, information indicating the event, or the value entered in the input field. Hereinafter, the event information received from the browser engine 340 will be referred to as a notified event.
[0055] In S701, the CPU 211 uses the field identification unit 311 to identify the input field that has been operated based on the event notified by the browser engine 340. Thereafter, the CPU 211 proceeds to the processing of S702.
[0056] In S702, the CPU 211 uses the event detection unit 312 to detect an event as an operation performed on an input field from the event notified by the browser engine 340. Thereafter, the CPU 211 proceeds to the processing of S703.
[0057] In S703, the CPU 211 determines whether the event detected in S702 is a focus-in event using the focus-in event determination unit 313. If the CPU 211 determines that it is a focus-in event (Yes), the process proceeds to S704, and if the CPU 211 determines that it is not a focus-in event (No), the process proceeds to S705. In S704, the CPU 211 notifies the browser application 330 of the focus-in event using the focus-in event notification unit 314, and ends the process shown in FIG.
[0058] In S705, CPU 211 determines whether the event detected in S702 is a click event using click event determination unit 315. If CPU 211 determines that it is a click event (Yes), it proceeds to processing of S706, and if it determines that it is not a click event (No), it proceeds to processing of S707. In S706, CPU 211 notifies browser application 330 of the click event using click event notification unit 316, and ends the processing shown in FIG.
[0059] In S707, the CPU 211 determines whether the event detected in S702 is a focus-out event using the focus-out event determination unit 317. If the CPU 211 determines that the event is a focus-out event (Yes), the process proceeds to S708, and if the CPU 211 determines that the event is not a focus-out event (No), the process shown in FIG.
[0060] In S708, the CPU 211 generates a change event using the change event generation unit 318, and proceeds to the processing of S709. In S709, the CPU 211 notifies the browser application 330 of a focus-out event using the focus-out event notification unit 319, and ends the processing shown in FIG.
[0061] <Application example> An application example of the event notification process of the event handler described above will be described with reference to Figures 4(b) and 4(c) and the flowchart of Figure 7. In this application example, a case will be described in which a focus-out event in the input field 401 shown in Figure 4(b) is notified from the browser engine 340.
[0062] 7, the CPU 211 uses the field identification unit 311 to identify the input field that has been operated based on the event notified by the browser engine 340. That is, when the user performs a focus-out operation on the input field 401 shown in FIG. 4(b), the field identification unit 311 identifies the input field notified by the browser engine 340 as the input field that has been operated.
[0063] In S702, the CPU 211 uses the event detection unit 312 to detect an event as an operation performed on an input field from the event notified by the browser engine 340. Here, it is assumed that the event handler 310 is notified by the browser engine 340 of a focus-out event.
[0064] In S703, the CPU 211 determines whether the event detected in S702 is a focus-in event using the focus-in event determination unit 313. Here, since the notified event is an event other than focus-in, the CPU 211 proceeds to the process of S705.
[0065] In S705, the CPU 211 determines whether the event detected in S702 is a click event using the click event determination unit 315. Here, since the notified event is an event other than a click, the CPU 211 proceeds to the processing of S707.
[0066] In S707, the CPU 211 determines whether the event detected in S702 is a focus-out event using the focus-out event determination unit 317. Here, since the event is a focus-out, the CPU 211 proceeds to the process of S708.
[0067] In S708, the CPU 211 generates a change event using the change event generation unit 318, and proceeds to the processing of S709. When the change event occurs, processing is executed to convert the lowercase "user" entered in the input field 401 shown in Fig. 4(b) to the uppercase "USER" in the input field 402 shown in Fig. 4(c). In S709, the CPU 211 notifies the browser application 330 of the focus-out event using the focus-out event notification unit 319.
[0068] According to this embodiment, the event handler generates a change event when it detects a focus-out event, not a focus-in event or a click event. When the event handler generates a change event, JavaScript corresponding to the change event is executed, so the characters entered in the input field are converted from lowercase to uppercase "USER." This solves the problem of change events not being generated due to changes in the browser engine, ensuring the usability of the browser.
[0069] <<Second embodiment>> In the first embodiment, an example was described in which a change event is generated when the event handler 310 detects a focus-out event. In the present embodiment, an example will be described in which the browser application 330 determines the event notification received from the event handler 310 and generates a change event.
[0070] <Software configuration diagram of image forming apparatus 101> As shown in FIG. 3, the program configuration of the web browser in this embodiment is the same as that of the first embodiment. Referring to FIG. 3, the details of the browser application 330 will be described.
[0071] The field identification unit 331 has the same configuration as the field identification unit 311. The event notification detection unit 332 detects the event notifications notified by the event handler 310. The event notifications to be detected are focus-in event notifications, click event notifications, and focus-out event notifications. The focus-in event notification determination unit 333 determines whether the event notification from the event handler 310 is a focus-in event notification and returns the determination result. The click event notification determination unit 334 determines whether the event notification from the event handler 310 is a click event and returns the determination result. The focus-out event notification determination unit 335 determines whether the event notification from the event handler 310 is a focus-out event and returns the determination result. The change event generation unit 336 has the same configuration as the change event generation unit 318.
[0072] <Event Notification Reception Process of Browser Application During Web Content Display> FIG. 8 is a flowchart showing an example of the process executed by the browser application 330. Referring to FIG. 8, the process in which the browser application 330 of the image forming apparatus 101 in this embodiment detects an event of a specific input field during web content display and receives an event notification from the event handler 310 will be described. The process shown in FIG. 8 is realized when the CPU 211 of the image forming apparatus 101 reads out a control program stored in a memory such as the ROM 212 into the RAM 213 and the CPU 211 executes it. The process shown in FIG. 8 starts when an event is notified from the browser engine 340 to the browser application 330.
[0073] In S801, the CPU 211 uses the field identification unit 331 to identify the input field that has been operated based on the event notified by the browser engine 340. Thereafter, the CPU 211 proceeds to the processing of S802.
[0074] In S802, the CPU 211 uses the event notification detection unit 332 to detect an event notification received from the event handler 310. After that, the CPU 211 proceeds to the processing of S803.
[0075] In S803, the CPU 211 determines whether the event notification detected in S802 is a focus-in event notification using the focus-in event notification determination unit 333. If the CPU 211 determines that the event notification is a focus-in event notification (Yes), it ends the processing shown in Fig. 8, and if it determines that the event notification is other than a focus-in event notification (No), it proceeds to the processing of S804.
[0076] In S804, the CPU 211 determines whether the event notification detected in S802 is a click event notification using the click event notification determination unit 334. If the CPU 211 determines that the event notification is a click event notification (Yes), it ends the processing shown in Fig. 8, and if the CPU 211 determines that the event notification is other than a click event notification (No), it proceeds to the processing of S805.
[0077] In S805, the CPU 211 determines whether the event notification detected in S802 is a focus-out event notification using the focus-out event notification determination unit 335. If the CPU 211 determines that the event notification is a focus-out event notification (Yes), the process proceeds to S806, and if the CPU 211 determines that the event notification is other than a focus-out event notification (No), the process shown in Fig. 8 ends. In S806, the CPU 211 generates a change event using the change event generation unit 336, and ends the process shown in Fig. 8.
[0078] According to this embodiment, if the received event notification is not a focus-in event notification, not a click event notification, and not a focus-out event notification, the browser application generates a change event. By generating a change event in the browser application, an effect of executing JavaScript corresponding to the change event can be obtained as in the first embodiment.
[0079] <<Third Embodiment>> In this embodiment, an example in which the event handler 310 generates a change event when there is a change in the values before and after the input in the input field will be described. Thereby, the change event can be generated more appropriately.
[0080] <Software Configuration Diagram in Image Forming Apparatus 101> FIG. 9 is a diagram showing an example of the program configuration of the web browser in this embodiment. FIG. 9 has the same basic configuration as FIG. 3, but is different in that some configurations are added to the event handler 310. Referring to FIG. 9, the details of the event handler 310 will be described. The description of the configuration of the event handler 310 described in the first embodiment will be omitted.
[0081] The field value storage unit 320 stores the value of the input field. The input value reception determination unit 321 determines whether the event detection unit 312 has received an input value and returns the determination result. The input value storage unit 322 stores the received input value. The input value change determination unit 323 compares the value of the field value storage unit 320 with the value of the input value storage unit 322 to determine whether there is a change and returns the determination result.
[0082] <Event Notification Processing of Event Handler During Web Content Display> Fig. 10 is a flowchart showing an example of processing executed by the event handler 310. With reference to Fig. 10, a process will be described in which the event handler 310 detects an event in a specific input field and notifies the event while Web content is being displayed by the browser application 330 of the image forming apparatus 101 in this embodiment. The processes from S701 to S709 shown in Fig. 10 are the same as the processes with the same step numbers shown in Fig. 7, and therefore description thereof will be omitted.
[0083] In S1001, the CPU 211 uses the field value storage unit 320 to store the field value of the input field identified in S701, and proceeds to the processing of S704. The field value is a value indicating a character string already entered in the input field, or a value indicating that the input field is empty. Note that, although a character string is used as an example of a value to be entered into the input field, values such as symbols and numbers may also be used.
[0084] In S1002, the CPU 211 determines whether the event detected in S702 is an input value reception event, using the input value reception determination unit 321. If the CPU 211 determines that the event is an input value reception event (Yes), the process proceeds to S1003, and if the CPU 211 determines that the event is an event other than input value reception (No), the process proceeds to S707.
[0085] In S1003, the CPU 211 uses the input value storage unit 322 to store the input value received in S702, and ends the processing shown in Fig. 10. The input value is a value indicating the character string input by the input operation.
[0086] In S1004, CPU 211 calls input value change determination unit 323, compares the value stored in field value storage unit 320 with the value stored in input value storage unit 322, and determines whether or not both values have changed. If CPU 211 determines that there has been a change (Yes), it proceeds to processing of S708, and if it determines that there has not been a change (No), it proceeds to processing of S709. Then, if there has been a change in both values, in S708 CPU 211 generates a change event using change event generation unit 336.
[0087] According to this embodiment, the event handler generates a change event when the event is not a focus-in event, not a click event, but a focus-out event, and when there is a change in the input value. As a result, the event handler generates a change event, which has the effect of executing JavaScript corresponding to the change event. In addition, by generating a change event when there is a change in the value before and after input in the input field, it is possible to suppress the generation of unnecessary change events.
[0088] <<Other embodiments>> In the above-described embodiment, an image forming apparatus has been described as an example of an information processing apparatus connectable to a network, but the information processing apparatus is not limited to this. For example, the information processing apparatus may be a desktop personal computer (PC), a notebook PC, a tablet terminal, a television, or any other device equipped with a general web browser.
[0089] In the above embodiment, the change event is described as a process of converting lowercase letters entered in an input field to uppercase letters, but is not limited to this. For example, the change event may be a process of converting entered characters into hiragana, katakana, kanji, or the like, a translation process of converting entered characters into another language, or a process of converting entered characters into symbols, numbers, or a combination thereof. The change event may also be a process of performing the reverse conversion of the above processes, such as a process of converting uppercase letters to lowercase letters.
[0090] The present disclosure can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.
[0091] The disclosure of the present embodiment includes configurations typified by the following information processing device example, information processing device control method example, and program example.
[0092] <Configuration 1> An information processing device that executes a web browser and an event handler implemented on the web browser, The event handler: When a specific event is notified from the browser engine, a change event is generated. and a processor for processing the information.
[0093] <Configuration 2> The event handler: 2. The information processing device according to configuration 1, further functioning as a notification unit that, when a predetermined event is notified from a browser engine, notifies the Web browser of the predetermined event.
[0094] <Configuration 3> The information processing device according to configuration 1 or 2, wherein the predetermined event is a focus-out event that removes focus from an input field displayed on the web browser when an input value has been entered in the input field.
[0095] <Configuration 4> 4. The information processing device according to configuration 3, wherein when the focus-out event is notified from the browser engine, the generating means generates the change event.
[0096] <Configuration 5> The event handler: further functioning as a determination means for comparing a value already entered in the input field with a value entered in the input field to determine whether or not there has been a change; 5. The information processing device according to configuration 3 or 4, wherein when the determining means determines that there is a change, the generating means generates the change event.
[0097] <Configuration 6> 6. The information processing device according to any one of configurations 3 to 5, wherein the change event is an event that changes a value input in the input field to a value different from the input value.
[0098] <Configuration 7> 7. The information processing device according to any one of configurations 3 to 6, wherein the change event is an event for converting lowercase letters entered in the input field into uppercase letters.
[0099] <Configuration 8> 8. The information processing device according to any one of configurations 1 to 7, wherein the browser engine is configured not to generate the change event.
[0100] <Configuration 9> 9. The information processing apparatus according to any one of configurations 1 to 8, wherein the information processing apparatus is an image forming apparatus.
[0101] <Configuration 10> An information processing device that executes a web browser and a browser application that is executed on the web browser, The browser app, When a specified event notification is received from an event handler, a change event is generated. and a processor for processing the information.
[0102] <Configuration 11> A method for controlling an information processing device that executes a web browser and an event handler that is executed on the web browser, comprising: a generating step of generating a change event when a predetermined event is notified to the event handler from a browser engine; 10. A method for controlling an information processing device, comprising:
[0103] <Configuration 12> A program for causing a computer to function as an event handler on a web browser, The computer, generating means for generating a change event when a predetermined event is notified to the event handler from a browser engine; A program characterized by executing the following.
Claims
1. An information processing device that executes a web browser and an event handler implemented on the web browser, The event handler: When a specific event is notified from the browser engine, a change event is generated. An information processing device characterized by functioning as follows.
2. The event handler:
2. The information processing apparatus according to claim 1, further functioning as a notification unit that, when a predetermined event is notified from a browser engine, notifies the Web browser of the predetermined event.
3. 2. The information processing apparatus according to claim 1, wherein the predetermined event is a focus-out event that removes focus from an input field displayed on the web browser when an input value has been entered in the input field.
4. 4. The information processing apparatus according to claim 3, wherein the generating means generates the change event when the focus-out event is notified from the browser engine.
5. The event handler: further functioning as a determination means for comparing a value already entered in the input field with a value entered in the input field to determine whether or not there has been a change; 4. The information processing apparatus according to claim 3, wherein when the determining means determines that there is a change, the generating means generates the change event.
6. 4. The information processing apparatus according to claim 3, wherein the change event is an event that changes a value input in the input field to a value different from the input value.
7. 4. The information processing apparatus according to claim 3, wherein the change event is an event for converting lowercase letters entered in the input field into uppercase letters.
8. 2. The information processing apparatus according to claim 1, wherein the browser engine is configured not to generate the change event.
9. 2. The information processing apparatus according to claim 1, wherein the information processing apparatus is an image forming apparatus.
10. An information processing device that executes a web browser and a browser application that is executed on the web browser, The browser app, When a specified event notification is received from an event handler, a change event is generated. An information processing device characterized by functioning as follows.
11. A method for controlling an information processing device that executes a web browser and an event handler that is executed on the web browser, comprising: a generating step of generating a change event when a predetermined event is notified to the event handler from a browser engine; 10. A method for controlling an information processing device, comprising:
12. A program for causing a computer to function as an event handler on a web browser, The computer, generating means for generating a change event when a predetermined event is notified to the event handler from a browser engine; A program characterized by executing the following.
Citation Information
Patent Citations
JP225802A