Data calling method based on WebAssembly technology webpage and related component
By deploying the main project and bridging project in the pages under the same domain name and establishing a communication channel, the problem of restricted calls of three-party JavaScript SDK under cross-domain isolation is solved, the file data upload function is realized, and the usability and scalability of the product is improved.
Patent Information
- Application Number
- CN202411521161.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
On browser sites that enable cross-domain isolation, the calls of the three-party JavaScript SDK are restricted, resulting in login failures and file selection failures, limiting the availability and scalability of the product.
By deploying the main project and the bridge project in the first and second pages under the same domain name, and establishing a communication channel, in response to the calling instructions of the main project, evoking the selection window in the second page, loading the third-party data in the bridge project, and sending the call result to the main project through the communication channel.
It solves the problem of restricted calls of the three-party JavaScript SDK on cross-domain isolation browser sites, realizes the function of uploading file data to the main project, and improves product availability and scalability.
Smart Images

Figure CN119512544A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data calling method and related components under a web page based on WebAssembly technology. Background Art
[0002] WebAssembly technology is used to port program capabilities written in non-JavaScript languages to browsers, such as implementing video transcoding, image enhancement, and running AI models in browsers. In order to speed up file processing, a multi-threaded processing mechanism is usually enabled, and the multi-threaded mechanism requires the use of the SharedArrayBuffer data type.
[0003] SharedArrayBuffer is a front-end cross-thread data sharing solution that can be used for WebAssembly program shared memory. For data security reasons, browser manufacturers require that cross-domain isolation restrictions be enabled for the use of SharedArrayBuffer. If not enabled, an error message indicating that SharedArrayBuffer is undefined will be reported.
[0004] However, for browser sites with cross-domain isolation enabled (a collection of multiple related web pages), calls to third-party JavaScript SDKs are restricted, such as Google login, Dropbox file upload, etc. The windows in these sites cannot communicate with the current window, resulting in login failure or file selection failure. This makes it impossible for the two to be shared on the same web page, greatly limiting the product's availability and scalability. Summary of the invention
[0005] The purpose of the present invention is to provide a data calling method and related components under a web page based on WebAssembly technology, aiming to solve the problem of limitation when calling third-party JavaScript SDK data on a browser site with cross-domain isolation enabled.
[0006] In a first aspect, an embodiment of the present invention provides a data calling method under a web page based on WebAssembly technology, comprising:
[0007] Preliminarily deploying the main project and the bridge project in the first page and the second page under the same domain name, respectively, and establishing a communication channel between the first page and the second page;
[0008] In response to a call instruction initiated from the main project, a selection window is called up in the second page according to the call instruction, and the third-party data in the bridge project is loaded in the selection window;
[0009] In response to a third-party data calling operation performed in the selection window, a calling result is sent to the main project through the communication channel.
[0010] In a second aspect, an embodiment of the present invention provides a data calling device under a web page based on WebAssembly technology, comprising:
[0011] A deployment unit, used to deploy the main project and the bridge project in a first page and a second page under the same domain name in advance, respectively, and establish a communication channel between the first page and the second page;
[0012] a loading unit, configured to, in response to a call instruction initiated from the main project, call up a selection window in the second page according to the call instruction, and load the third-party data in the bridge project in the selection window;
[0013] The calling unit is used to respond to the third-party data calling operation performed in the selection window and send the calling result to the main project through the communication channel.
[0014] In a third aspect, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data calling method based on the WebAssembly technology web page described in the first aspect is implemented.
[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the data calling method under the web page based on WebAssembly technology as described in the first aspect above.
[0016] The beneficial effect of the embodiment of the present invention is: when a WebAssembly package exists in the main project and a multi-threaded speed-up solution is used, the calling problem of the third-party JavaScript SDK is solved to realize the function of uploading file data to the main project. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1A schematic diagram of a flow chart of a data calling method based on a WebAssembly technology web page provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of a sub-flow of a data calling method based on a WebAssembly technology web page provided by an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of another sub-flow of a method for calling data on a web page based on WebAssembly technology provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of another sub-flow of a method for calling data on a web page based on WebAssembly technology provided by an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of another sub-flow of a method for calling data on a web page based on WebAssembly technology provided by an embodiment of the present invention;
[0023] Figure 6 A schematic diagram of another sub-flow of a method for calling data on a web page based on WebAssembly technology provided by an embodiment of the present invention;
[0024] Figure 7 A schematic diagram of another sub-flow of a method for calling data on a web page based on WebAssembly technology provided by an embodiment of the present invention;
[0025] Figure 8 A schematic block diagram of a data calling device based on a WebAssembly technology web page provided by an embodiment of the present invention;
[0026] Fig. 9 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0029] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.
[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0031] See also Figure 1 , Figure 1 A schematic diagram of a flow chart of a data calling method based on a WebAssembly technology web page provided by an embodiment of the present invention;
[0032] like Figure 1 As shown, the method includes steps S101 to S103.
[0033] S101, pre-deploy a main project and a bridge project in a first page and a second page under the same domain name, respectively, and establish a communication channel between the first page and the second page;
[0034] S102, in response to a call instruction initiated from the main project, calling up a selection window in the second page according to the call instruction, and loading the third-party data in the bridge project in the selection window;
[0035] S103: In response to the third-party data calling operation executed in the selection window, the calling result is sent to the main project through the communication channel.
[0036] In this embodiment, the main project of the first page is used to carry the conventional interface display and function use, and the bridge project in the second page is used to carry the functional components that need to call the third-party JavaScript SDK. The first page and the second page under the same domain name can communicate with each other, that is, the main project and the bridge project are deployed in the corresponding paths of the first page and the second page respectively, and a channel agreed by both parties can be established to carry out the required communication. When the main project has a WebAssembly package and a multi-threaded speed-up solution is used, the calling problem of the third-party JavaScript SDK can be solved to realize the function of uploading the file data of the bridge project to the main project.
[0037] In one embodiment, if Figure 2 As shown, in step S101, the steps of pre-deploying the main project and the bridge project in the first page and the second page under the same domain name respectively include:
[0038] S201, obtaining project data required for building the main project through a deployment tool, installing and packaging it, and deploying it on the first page;
[0039] S202, in response to an upload instruction initiated from the main project, opening a new window according to the upload instruction and serving as a second page;
[0040] S203: Obtain project data required for building the bridge project through a deployment tool, install and package it, and deploy it on the second page.
[0041] In this embodiment, the main project and the bridge project are deployed in the same way. The specific process can be: the project code can be hosted through a source code hosting tool (such as gitlab), combined with the multi-master-slave architecture construction technology and container technology in open source software tools (such as jenkins), and automated operation and maintenance tools (such as ansible) are used to achieve automated deployment. During deployment, you can get the relevant project files from the code repository through hooks, then install the dependent npm packages in the project files and use the npm runbuild command to package them. After deployment, the two projects are independent of each other and do not affect each other. When the main project needs the bridge project to participate, open the window to trigger its components to realize the call.
[0042] Among them, the npm package is a package management and distribution tool based on Node.js, which is used to publish and manage Node modules. It allows developers to download required dependency packages from the npm repository, greatly simplifying the complexity of JavaScript development. The npm package management tool makes code sharing and reuse easier, and promotes the prosperity and development of the Node.js ecosystem.
[0043] Among them, the npmrunbuild command is the package manager of Node.js, which is used to install and manage project dependencies, and can also be used to run scripts in project files.
[0044] In one embodiment, if Figure 3 As shown, in step S101, the step of establishing a communication channel between the first page and the second page includes:
[0045] S301, creating a receiving channel for a first page to receive data by using a cross-page communication technology;
[0046] S302. Create a sending channel for sending data from the second page by using a cross-page communication technology, where the name of the sending channel is the same as that of the main project.
[0047] In this embodiment, an "Upload" button that calls the window.open method is pre-connected to the main project of the first page. Through this button, the "Upload" button can open a new page and serve as the second page. At the same time, the newBroadcastChannel() method is used, and the name X is passed in (X is named according to the bridge project, for example, when the bridge project is a Dropbox file, the name is "Dropbox"), and a receiving channel for receiving data for the first page can be created. Correspondingly, continuing to take the bridge project as a Dropbox file as an example, the bridge project will store the relevant code of the Dropbox file, including script loading, required configuration, etc. At the same time, the newBroadcastChannel() method is used, and the name "Dropbox" is passed in, a communication channel with the same name as the main project can be created and used as a sending channel, and information can be sent to the main project through the sending channel.
[0048] Among them, the new BroadcastChannel() method is a JavaScript API, which is used to provide a cross-page communication mechanism to realize the sending and receiving of messages between different pages under the same domain name or in the same page.
[0049] In one embodiment, if Figure 4 As shown, step S102 includes:
[0050] S401, in response to a call instruction initiated from a main project, calling up a selection window for carrying a bridge project in a second page according to the call instruction;
[0051] S402, automatically or manually loading a data script in a selection window, and opening a bridge project through the data script execution result, wherein the bridge project includes one of a Dropbox file, Google login data, and a Facebook sharing window.
[0052] In this embodiment, after initiating a call instruction from the main project, the second page hosting the bridge project is triggered to open. Here, two modes can be selected: automatic triggering and manual button triggering. Automatic triggering means that when the second page is opened, the corresponding script is directly loaded after the second page is mounted. Manual triggering means adding an extra button in the second page for the user to click to trigger the loading of the corresponding script.
[0053] In this embodiment, there may be multiple bridge items to implement more required three-party calls, such as one of Dropbox files, Google login data, and Facebook sharing window.
[0054] In a specific embodiment, the main project is connected to Dropbox file upload as an example.
[0055] In this specific embodiment, Figure 5 As shown, step S103 includes:
[0056] S501, in response to a Dropbox file upload operation performed by a user in a selection window, displaying a list of all files in a Dropbox account according to the Dropbox file upload operation;
[0057] S502, responding to a required file list selected by the user in the Dropbox file;
[0058] S503: Send the required file list through the sending channel through the callback function, so that the main project receives the required files through the receiving channel.
[0059] In this specific embodiment, in response to a call instruction initiated from the main project, a second page for hosting the Dropbox file is called up in the second page according to the call instruction, and the following steps are triggered:
[0060] 1) Load the Dropbox SDK script in the bridge project;
[0061] 2) After loading is complete, get the Dropbox instance from the script execution result;
[0062] 3) Configure the required file selection parameters such as success, linkType, multiselect, extensions, sizeLimit, etc.
[0063] 4) Call the choose method of the Dropbox instance and pass the relevant parameters consisting of the above parameters to the choose method.
[0064] After executing the above steps, the Dropbox file selection window is called up, and the file list in the Dropbox account can be displayed in this selection window. In response to the user's file selection, the required file list is confirmed, and the callback function (such as the success method) passed in step 3) above is triggered. The callback method of this callback function can receive the required file list. At this time, the bridge project can use the previously established sending channel to send the required file list through the postMessage method in the success method; the main project can use the onmessage method to receive the required file list through the receiving channel, that is, the required file list will be used for subsequent business processing. At this point, the main project has a WebAssembly package and uses a multi-threaded speed-up solution. At the same time, the function of uploading Dropbox files using the Dropbox SDK's own capabilities can be realized.
[0065] Among them, the onmessage method is an API widely used in HTML5, which can be used to implement cross-document messaging and communication between Web Workers.
[0066] In a specific embodiment, take the main project accessing Google login as an example.
[0067] In this specific embodiment, Figure 6 As shown, step S103 also includes:
[0068] S601, responding to a Google login data calling operation performed by a user in a selection window;
[0069] S602, calling an operation according to Google login data to evoke a pop-up window with a prompt of the logged-in Google account;
[0070] S603, responding to the user's confirmation operation on the logged-in Google account in the prompt pop-up window;
[0071] S604, sending the logged-in Google account through the sending channel through the callback function, so that the main project receives the logged-in Google account through the receiving channel, and opens the connection between the logged-in Google account and the first page.
[0072] In this specific embodiment, in response to a call instruction initiated from the main project, a second page for carrying Google login data is called up in the second page according to the call instruction, and the following steps are triggered:
[0073] 1) Load the Google SDK script in the bridge project. This process can be simplified by installing the google-one-tap npm package.
[0074] 2) Configure the relevant parameters required for Google login, such as client_id, ux_mode, auto_prompt, etc.
[0075] 3) Call the instance method exposed by google-one-tap and pass in the relevant parameters of step 2), and a pop-up window with the logged-in Google account information will pop up in the upper right corner of the screen;
[0076] 4) In response to the confirmation operation of clicking "Log in with this account" on the prompt pop-up window, the callback function of the instance method can receive the information of the logged-in Google account, and then use the postMessage method to send the logged-in Google account information to the main project. The main project uses the onmessage method to receive the logged-in Google account information, and can enable the connection between the Google account and the current page as needed.
[0077] At this point, the main project has a WebAssembly package and uses a multi-threaded speed-up solution. At the same time, the Google SDK's own capabilities can be used to perform Google login.
[0078] In a specific embodiment, taking the main project access to Facebook sharing as an example.
[0079] In this specific embodiment, Figure 7 As shown, step S103 also includes:
[0080] S701, responding to a Facebook sharing call operation performed by a user in a selection window;
[0081] S702, calling up a sharing pop-up window according to the Facebook sharing call operation;
[0082] S703, receiving the sharing content input by the user in the sharing pop-up window, and sending the sharing content to the connected Facebook platform to complete the sharing;
[0083] S704, responding to the sharing success information including the shared content returned by the Facebook platform;
[0084] S705 . Sending the sharing success information through the sending channel through the callback function, so that the main project receives the sharing success information through the receiving channel.
[0085] In this specific embodiment, in response to a call instruction initiated from the main project, a second page for carrying Facebook sharing is called up in the second page according to the call instruction, and the following steps are triggered:
[0086] 1) Load the Facebook SDK script in the bridge project;
[0087] 2) Call FB.init() method to initialize;
[0088] 3) Call FB.ui() method;
[0089] 4) After the above method is executed, the sharing pop-up window can be called up, the sharing content entered by the user in the sharing pop-up window can be received, and the sharing content can be sent to the connected Facebook platform to complete the sharing; when the sharing is successful, the callback function can receive the returned sharing success information containing the sharing content, and then use the postMessage method in the callback to send the sharing success information to the main project. The main project uses the onmessage method to receive the sharing success information, and the Facebook sharing action can be completed, and subsequent logical processing can be performed on the sharing behavior.
[0090] The embodiment of the present invention also provides a data calling device based on WebAssembly technology web page, which is used to execute any embodiment of the data calling method based on WebAssembly technology web page. Figure 8 , Figure 8 It is a schematic block diagram of a data calling device based on a WebAssembly technology web page provided by an embodiment of the present invention.
[0091] like Figure 8 As shown, a data calling device 800 under a web page based on the WebAssembly technology includes: a deployment unit 801, a loading unit 802 and a calling unit 803.
[0092] A deployment unit 801 is used to deploy the main project and the bridge project in the first page and the second page under the same domain name in advance, and establish a communication channel between the first page and the second page;
[0093] A loading unit 802 is used to respond to a call instruction initiated from the main project, call up a selection window in the second page according to the call instruction, and load the third-party data in the bridge project in the selection window;
[0094] The calling unit 803 is used to send the calling result to the main project through the communication channel in response to the third-party data calling operation executed in the selection window.
[0095] The main project on the first page of the device is used to carry conventional interface display and function use, and the bridge project on the second page is used to carry functional components that need to call the third-party JavaScript SDK. The first page and the second page under the same domain name can communicate with each other, that is, the main project and the bridge project are deployed on the corresponding paths of the first page and the second page respectively, and a channel agreed upon by both parties can be established to carry out the required communication. When the main project has a WebAssembly package and a multi-threaded speed-up solution is used, the calling problem of the third-party JavaScript SDK can be solved to realize the function of uploading the file data of the bridge project to the main project.
[0096] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0097] The data calling device based on the WebAssembly technology webpage can be implemented in the form of a computer program. The computer program can be Fig. 9 Runs on the computer device shown.
[0098] See also Fig. 9 , Fig. 9 900 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device 900 is a server, which can be an independent server or a server cluster composed of multiple servers.
[0099] See also Fig. 9 The computer device 900 includes a processor 902 , a memory and a network interface 905 connected via a system bus 901 , wherein the memory may include a non-volatile storage medium 903 and an internal memory 904 .
[0100] The non-volatile storage medium 903 can store an operating system 9031 and a computer program 9032. When the computer program 9032 is executed, the processor 902 can execute a data calling method under a web page based on the WebAssembly technology.
[0101] The processor 902 is used to provide computing and control capabilities to support the operation of the entire computer device 900 .
[0102] The internal memory 904 provides an environment for the operation of the computer program 9032 in the non-volatile storage medium 903. When the computer program 9032 is executed by the processor 902, the processor 902 can execute a data calling method under a web page based on the WebAssembly technology.
[0103] The network interface 905 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 900 to which the solution of the present invention is applied. The specific computer device 900 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0104] Those skilled in the art will understand that Fig. 9 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Fig. 9 The embodiments shown are consistent and will not be described again here.
[0105] It should be understood that in the embodiment of the present invention, the processor 902 may be a central processing unit (CPU), and the processor 902 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0106] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, a data calling method based on a WebAssembly technology web page of an embodiment of the present invention is implemented.
[0107] The storage medium is a physical, non-transient storage medium, for example, it can be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, etc., which can store program codes.
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0109] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A data calling method based on a WebAssembly technology web page, characterized in that: include: Preliminarily deploying the main project and the bridge project in the first page and the second page under the same domain name, respectively, and establishing a communication channel between the first page and the second page; In response to a call instruction initiated from the main project, a selection window is called up in the second page according to the call instruction, and the third-party data in the bridge project is loaded in the selection window; In response to a third-party data calling operation performed in the selection window, a calling result is sent to the main project through the communication channel.
2. The data calling method based on WebAssembly technology webpage according to claim 1 is characterized in that: The pre-deploying of the main project and the bridge project in the first page and the second page under the same domain name respectively includes: Obtain the project data required to build the main project through the deployment tool, install and package it, and deploy it on the first page; In response to an upload instruction initiated from the main project, opening a new window as a second page according to the upload instruction; The project data required for building the bridge project is obtained through the deployment tool, installed and packaged, and deployed in the second page.
3. The data calling method based on WebAssembly technology webpage according to claim 1 is characterized in that: The establishing of a communication channel between the first page and the second page includes: Creating a receiving channel for the first page to receive data by using a cross-page communication technology; A sending channel for sending data from the second page is created by using a cross-page communication technology, wherein the sending channel has the same name as that of the main project.
4. The data calling method based on WebAssembly technology webpage according to claim 3 is characterized in that: The method of responding to the calling instruction initiated from the main project, calling up a selection window in the second page according to the calling instruction, and loading the third-party data in the bridge project in the selection window includes: In response to a call instruction initiated from the main project, calling up a selection window for carrying the bridge project in the second page according to the call instruction; A data script is automatically or manually loaded in the selection window, and the bridge project is opened through the data script execution result, wherein the bridge project includes one of a Dropbox file, Google login data, and a Facebook sharing window.
5. The data calling method based on WebAssembly technology webpage according to claim 4 is characterized in that: The step of sending the call result to the main project through the communication channel in response to the third-party data call operation performed in the selection window includes: In response to a Dropbox file upload operation performed by the user in the selection window, displaying a list of all files in the Dropbox account according to the Dropbox file upload operation; In response to a user selecting a desired file list in the Dropbox file; The required file list is sent through the sending channel through the callback function, so that the main project receives the required files through the receiving channel.
6. The data calling method based on WebAssembly technology webpage according to claim 4 is characterized in that: In response to the third-party data calling operation executed in the selection window, sending the calling result to the main project through the communication channel also includes: In response to a Google login data calling operation performed by the user in the selection window; Invoke an operation according to the Google login data to prompt a pop-up window with a logged-in Google account; In response to the user confirming the logged-in Google account in the prompt pop-up window; The logged-in Google account is sent through the sending channel through the callback function, so that the main project receives the logged-in Google account through the receiving channel and opens the interconnection between the logged-in Google account and the first page.
7. The data calling method based on WebAssembly technology webpage according to claim 4 is characterized in that: In response to the third-party data calling operation executed in the selection window, sending the calling result to the main project through the communication channel also includes: Responding to a Facebook sharing call operation performed by the user in the selection window; Invoke a sharing pop-up window according to the Facebook sharing call operation; Receive the sharing content entered by the user in the sharing pop-up window, and send the sharing content to the connected Facebook platform to complete the sharing; Responding to the sharing success information including the shared content returned by the Facebook platform; The sharing success information is sent through the sending channel through the callback function, so that the main project receives the sharing success information through the receiving channel.
8. A data calling device based on a WebAssembly technology web page, characterized in that: include: A deployment unit, used to deploy the main project and the bridge project in a first page and a second page under the same domain name in advance, respectively, and establish a communication channel between the first page and the second page; a loading unit, configured to, in response to a call instruction initiated from the main project, call up a selection window in the second page according to the call instruction, and load the third-party data in the bridge project in the selection window; The calling unit is used to respond to the third-party data calling operation performed in the selection window and send the calling result to the main project through the communication channel.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for calling data on a web page based on WebAssembly technology according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the data calling method based on the WebAssembly technology under a web page as described in any one of claims 1 to 7.