Method and device for reediting front-end script program

A script program and editing technology, which is applied in the field of re-editing front-end script programs, can solve the problems of unresponsive web pages, long response time for web page loading, and affecting user experience, etc.

Active Publication Date: 2020-03-27
BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF5 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In this way, the browser needs to introduce an additional loader, resulting in additional resource overhead for the browser, and the loader needs to call the third-party module from the server corresponding to the third-party module, and execute the files under the corresponding module path of the dependent third-party module Parsing will lead to a longer webpage loading response time, especially when there are many third-party modules that depend on (referred to as third-party dependent modules), it will take more browser resources and a longer time to parse, resulting in long webpages displayed Unresponsive for a long time, affecting user experience

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 reediting front-end script program
  • Method and device for reediting front-end script program
  • Method and device for reediting front-end script program

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045]In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is a part of embodiments of the present invention, but not all embodiments. The components of the embodiments of the invention generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making ...

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 provides a method and device for re-editing a front-end script program. The method comprises the following steps: extracting a text in a to-be-re-edited front-end script program, and converting the extracted text into a syntax tree structure object through a script syntax parser; traversing each node in the syntax tree structure object, and for each third-party dependent module traversed by the node, obtaining a format of a module path of the third-party dependent module; determining that the format of the module path of the third-party dependent module does not accord with the loading format of the browser, and updating the format of the module path of the third-party dependent module to accord with the loading format of the browser to obtain an updated loading format; updating the module path of the third-party dependent module according to the updating loading format to obtain a module updating path, and storing a dependent file under the module path of the third-partydependent module to the module updating path; and generating a reedited front-end script updating program according to the updated syntax tree structure object. The resource overhead of the browser can be reduced.

Description

technical field [0001] The invention relates to the technical field of browser front-end development, in particular to a method and device for re-editing a front-end script program. Background technique [0002] As the information contained in the web page becomes more and more abundant, the front-end script (JavaScript) program used to construct the web page becomes more and more complicated. At present, in order to improve the development efficiency of front-end JavaScript programs, modular development methods are generally adopted to reduce the complexity of editing, for example, editing front-end JavaScript programs based on Node.js and module standards. However, some modules in the edited front-end JavaScript program depend on third-party modules, and the format of the module path of the third-party module may not be compatible with the format supported by the browser. Therefore, in order to enable the edited front-end JavaScript program to be published to the browser ...

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/41
CPCG06F8/427
Inventor 丁鑫
Owner BEIJING MININGLAMP SOFTWARE SYST CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products