Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for executing javascript script on multiple browser platforms

A multi-browser and browser version technology, applied in the Internet field, can solve problems such as large code overhead, large code volume, error-prone batch replacement, etc., and achieve the effect of low overhead and low error probability

Active Publication Date: 2017-10-13
SANGFOR TECH INC
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In view of the above problems, when developing a new web system, although the code can be encapsulated by encapsulating functions, for the transplanted web system or when maintaining the existing web system, if the javascript in the existing code statement to replace the encapsulated function, the amount of code that needs to be replaced is large, and batch replacement is prone to errors, resulting in a large cost of code maintenance or transplantation

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
  • Method and device for executing javascript script on multiple browser platforms
  • Method and device for executing javascript script on multiple browser platforms
  • Method and device for executing javascript script on multiple browser platforms

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035] Javascript, is an object-based, dynamically typed, case-sensitive client-side scripting language. Netscape originally named its scripting language LiveScript, and the main design principles of JavaScript were derived from Self and Scheme. In order to gain a technical advantage, Microsoft launched JScript to confront the JavaScript scripting language. For interoperability, Ecma International (formerly the European Computer Manufacturers Association) created the ECMA-262 standard (ECMAScript). Both now belong to the implementation of ECMAScript. Although JavaScript is promoted and advertised as a scripting language for non-programmers rather than as a scripting language for programmers, JavaScript is very feature-rich.

[0036] It can be seen that JavaScript has compatibility problems in various browser products, that is, because different browsers have different parsing of the same JavaScript code, resulting in inconsistent page display performance, this inconsistency ...

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

A method for multi-browser platforms to execute javascript scripts, comprising: loading a preset code replacement script, wherein the code replacement script defines attribute calls and / or function calls adapted to browser versions defined through a javascript prototype mechanism implementation code; receive javascript execution instructions, obtain corresponding execution statements, the execution statements include property calls and / or function calls; obtain browser version information; call the code according to the browser version information to replace the code defined in the script with the The implementation code corresponding to the above attribute call and / or function call is executed. In addition, a device for executing javascript scripts on multiple browser platforms is also provided. The above method and device for executing javascript scripts on multiple browser platforms can reduce maintenance or transplantation costs.

Description

technical field [0001] The invention relates to the technical field of the Internet, in particular to a method and a device for executing javascript scripts on a multi-browser platform. Background technique [0002] The current browser market is flooded with a large number of browser products, including IE, Chrome, Firefox, Opera, 360 browser, Sogou browser, Cheetah browser, Baidu browser, qq browser and so on. So many browsers bring users a different user experience, but what they bring to developers is extremely difficult to develop. The kernel of existing browser products is usually one of the following three browser kernels: IE kernel, chrome kernel and firefox kernel, and browser products based on different browser kernels often have some differences in the parsing methods of javascript scripts. Differences, so that certain javascript statements cannot be executed normally on specific browsers. [0003] In order to make the javascript scripts on the web pages run norm...

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 Patents(China)
IPC IPC(8): G06F9/445
Inventor 董伟
Owner SANGFOR TECH INC
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More