Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method for controlling page jump based on web page assembly language

An assembly language, page jumping technology, applied in the direction of program code conversion, instrumentation, electrical digital data processing, etc., can solve the problem that WebAssembly cannot directly obtain BOM and DOMAPI, etc., and achieve the effect of web page security performance guarantee and code security performance directly.

Inactive Publication Date: 2019-01-29
QINGDAO RES INST OF BEIHANG UNIV
View PDF2 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The present invention aims to solve the above-mentioned problems in the prior art and provides a method for controlling page jump based on webpage assembly language, in order to overcome the deficiency that existing WebAssembly cannot directly obtain BOM and DOMAPI, and realize dynamic webpage jump without the need for a third party plug-in

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method for controlling page jump based on web page assembly language

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0019] Example 1, such as figure 1 As shown, the overall processing flow of controlling page redirection based on WebAssembly is given, which mainly includes the following steps:

[0020] Step (1), implement a C++ function

[0021] The C++ function has a parameter through which the target URL address to be redirected can be received, and the parameter type is a string; in the function body, the incoming string needs to be transcoded first, and then the JavaScript function is called and Pass in the transcoded character array;

[0022] 1) String conversion

[0023] Loop through the target address string passed in as a function parameter, convert each character into UTF-8 standard encoding format, and store it in a character array. The purpose of transcoding the string is to avoid garbled characters caused by encoding errors when the address is passed into the JavaScript function.

[0024] 2) Call the JavaScript function

[0025] Through the macro function EM_ASM_ARGS provid...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method for controlling page jump based on web page assembly language, comprising the following steps: 1 compiling a function by using C + + language, obtaining a target URLaddress to be jumped in the form of a string through parameters of the function; the target JavaScript function is called and the converted character set is passed to the target JavaScript function asa parameter; 2, compiling that C + + source code into an LLVM bytecode, and converting the bytecode into WebAssembly through a compile tool; 3 rewriting a JavaScript function whose name and parameters are consistent with the called target JavaScript function in step 1; by rewriting the parameters of the JavaScript function, the target address of the web page to be jumped is obtained; 4, in the HTML page, the WebAssembly obtained in the step 2is loaded and parsed, the JavaScript function obtained in the step (3) is loaded and parsed, and the page is controlled to jump to the target address byusing the DOM standard function of the HTML.

Description

technical field [0001] The invention relates to a method for controlling directional jump of pages based on webpage assembly language (WebAssembly), and belongs to the technical field of computer software programming and Internet application. Background technique [0002] At present, with the continuous improvement of the data transmission bandwidth of the Internet and the improvement of the functions of wireless mobile devices, the requirements for the effect of the front-end webpage are also increasing. JavaScript functions in existing browsers are generally executed in a virtual machine (Virtual Machine), which can maximize code optimization, which also makes JavaScript functions known as one of the fastest dynamic languages. [0003] But despite this, it was not comparable to native C / C++ code, so WebAssembly was duly used widely. Using WebAssembly, you can run some high-performance, low-level programming languages ​​​​in the browser, and you can use it to import large ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/38G06F8/30G06F8/51
CPCG06F8/315G06F8/38G06F8/51
Inventor 刘俊郝爱民李如意张素梅郭日俊
Owner QINGDAO RES INST OF BEIHANG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products