Check patentability & draft patents in minutes with Patsnap Eureka AI!

Native function calling method and system of webpage

A function and webpage technology, applied in the field of calling native functions on webpages, can solve problems such as increasing debugging difficulty and affecting debugging efficiency, and achieve the effect of improving debugging efficiency and reducing debugging complexity.

Active Publication Date: 2015-12-30
TENCENT TECH (SHENZHEN) CO LTD
View PDF4 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The above technology of calling native functions has obvious defects. For example, when debugging a webpage on a browser to call native functions extended by browser components, it is impossible to judge that the fake protocol will cause the address to jump to a URL that does not exist. Sometimes it is necessary to modify the webpage address of the browser component to debug the page with the help of development tools, which increases the difficulty of debugging and affects the efficiency of debugging

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
  • Native function calling method and system of webpage
  • Native function calling method and system of webpage
  • Native function calling method and system of webpage

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The specific implementation of the method and system for calling a native function by a web page of the present invention will be described in detail below in conjunction with the accompanying drawings.

[0025] refer to figure 1 as shown, figure 1 A flowchart of a method for invoking native for a webpage of an embodiment includes the following steps:

[0026] In step S10, the resource request of the web page is obtained through the browser component.

[0027] In this step, the resource request initiated by the web page can be received through the browser component. After receiving the resource request of the web page, the browser component will access and load the relevant resources. Therefore, the loading of the browser component can be taken over here Resource request, to monitor all resource loading behaviors of browser components.

[0028] Resource requests for web pages can be implemented through JS (abbreviation for JavaScript, referring to a scripting languag...

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 native function calling method of a webpage. The method includes the steps that a resource request of the webpage is obtained through a browser assembly; a uniform resource locator of the resource is parsed out according to the resource request; a native commend is obtained and executed according to the uniform resource locator; besides, the invention further provides a native function calling system of the webpage. According to the technical scheme, the browser assembly takes over the resource request when loading the resource, the uniform resource locator of the resource is parsed, the native commend is obtained and executed, and mutual calling of the webpage and the native is achieved in a resource loading mode, so that in the webpage debugging process, the page jump mode does not need to be amended, page debugging can be conducted through a development tool, the debugging complexity is lowered, and debugging efficiency is improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and system for calling native functions by web pages. Background technique [0002] "native" means native, and refers to the native language used to write the native application on the corresponding system. "Native" refers to different languages ​​on different systems. For example, the native application of the iOS system is written in Objective-C. Android system native applications are written in Java. [0003] At present, the technology of calling the native function of the webpage generally listens to the URL (UniformResoureLocator, Uniform Resource Locator) loading event of the browser component (webview) through a pseudo-protocol, and then intercepts the request according to the schema stipulated in the pseudo-protocol, parses the URL and converts the Instructions and parameters that need to be passed to the native call. [0004] The above technology of calling ...

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): G06F9/445G06F9/46
Inventor 王志斌
Owner TENCENT TECH (SHENZHEN) CO LTD
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