Method for solving problem of duplication of names of functions in JS files

The invention relates to the technical field of software development, in particular to a method for solving the problem of duplication of names of functions in JS files. According to the method, a JS self-defining function is written by means of the action scope of a JS function and is encapsulated,...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: JI TONGKAI, XU ZHENYU, QI ZHAOYONG, SUN AOBING
Format: Patent
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention relates to the technical field of software development, in particular to a method for solving the problem of duplication of names of functions in JS files. According to the method, a JS self-defining function is written by means of the action scope of a JS function and is encapsulated, wherein self-defining function encapsulation comprises the steps of defining the name of a namespace, registering the namespace and using the namespace, namespace definition is about assigning a name to a corresponding JS namespace according to a module to be developed, namespace registration is about binding the namespace with function definition, and namespace usage is about writing a corresponding operational approach in a corresponding function body or establishing an operational approach by means of the mode of a prototype. The method solves the problem that duplication of names of functions occurs easily during modular software development and can be applied to software development.