Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for processing javascript object by one selector and at most one parameter

A parameter processing and selector technology, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve problems such as difficulty in processing various javascript objects, discounts, and no function efficiency

Inactive Publication Date: 2013-07-24
李宗申
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] With the rapid development of web development, people have higher and higher quality requirements for modern web browsing. The mainstream web front-end development language is javascript scripting language. However, due to the incompatibility of javascript language itself and browsers, It makes it very difficult to deal with various javascript objects. In this case, a large number of functions have to be written to meet some special requirements
But even here, there is no essential relationship between functions and objects, which greatly reduces the efficiency of managing and using these functions

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 for processing javascript object by one selector and at most one parameter
  • Method for processing javascript object by one selector and at most one parameter
  • Method for processing javascript object by one selector and at most one parameter

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The specific embodiment of the present invention will be described in further detail below in conjunction with accompanying drawing:

[0025] figure 1 It shows the types of self-defined classes and the mutual inheritance relationship, which are mainly divided into three types: base class, entry class and subclass.

[0026] First, you should create a custom base class and create corresponding extension methods in the base class. E.g:

[0027]

[0028] Among them, ObjectObj is our new base class.

[0029] Add instance methods to ObjectObj below, for example:

[0030]

[0031]

[0032] Among them, inheritFrom and jsonToString are instance methods of the ObjectObj base class.

[0033] Then create a subclass, for example, the method of creating a StringObj subclass is as follows:

[0034]

[0035] Among them, StringObj is a newly created subclass, StringObj inherits from ObjectObj base class, trim and repeat are extension methods of StringObj. _inheritProto...

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 programming method for quickly accessing and processing any javascript object under the condition that only one selector and at most one parameter are used. According to the method, javascript is used for simulating one base class, one entry class and a plurality of sub classes; firstly, whether a single selector or a unique parameter is used is checked; if the single selector is used, a common extension method is directly called; if the unique parameter is used, the automatic judgment of the parameter type is carried out by the entry class to enable the control power to be jumped to the corresponding sub class; for the String type, the DOM (document object model) selection operation can be simultaneously carried out; and the Function type also can be simultaneously served as an onload function and is compatible with the original type of extension method. According to the method, the javascript object is integrated with the common function and a cross-browser method, and therefore, the objects can be more simply and efficiently operated. On the basis of supporting all main stream browsers, great convenience, simpleness and expandability can be provided for all traditional javascript programming.

Description

technical field [0001] The invention belongs to the field of javascript programming of computer browsers, and specifically relates to a method for operating javascript objects: a method for quickly accessing and processing arbitrary javascript objects under the condition of only using one selector and at most one parameter. Background technique [0002] With the rapid development of Web development, people have higher and higher requirements for the quality of modern web browsing. The mainstream Web front-end development language is javascript scripting language. It makes it very difficult to deal with various javascript objects. In this case, a large number of functions have to be written to meet some special requirements. But even here, there is no essential relationship between functions and objects, which greatly reduces the efficiency of managing and using these functions. [0003] Therefore, it is necessary to provide a method to solve the above defects. Contents of...

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
IPC IPC(8): G06F17/30
Inventor 李宗申
Owner 李宗申