diff --git a/LoadPerformanceInWeb/entry/src/main/ets/pages/CaseOne.ets b/LoadPerformanceInWeb/entry/src/main/ets/pages/CaseOne.ets index d0bd21c65e7406286aa53d6340774a74ca09fa16..84434601ff2c032808f051571470880bf4d32db9 100644 --- a/LoadPerformanceInWeb/entry/src/main/ets/pages/CaseOne.ets +++ b/LoadPerformanceInWeb/entry/src/main/ets/pages/CaseOne.ets @@ -10,7 +10,7 @@ export default class EntryAbility extends UIAbility { webview.WebviewController.initializeWebEngine(); // When pre-connecting, you need to replace' https://www.example.com' with the actual website address to visit // Specify that the second parameter is true, which means to pre-connect. If it is false, the interface will only pre-resolve the URL. - // 第三个参数numSockets,取值范围1-6,超过6按照6处理 + // The third parameter, numSockets, has a value range of 1-6. If it exceeds 6, the parameter will be treated as 6. webview.WebviewController.prepareForPageLoad('https://www.example.com/', true, 2); AppStorage.setOrCreate('abilityWant', want); console.log('EntryAbility onCreate done'); diff --git a/LoadPerformanceInWeb/entry/src/main/ets/pages/CaseThree.ets b/LoadPerformanceInWeb/entry/src/main/ets/pages/CaseThree.ets index ed05aa973cbbe9bef1fe4168164f7e3f7cd6efd9..df431fd6b9436f0ad430574140fddf36995e760d 100644 --- a/LoadPerformanceInWeb/entry/src/main/ets/pages/CaseThree.ets +++ b/LoadPerformanceInWeb/entry/src/main/ets/pages/CaseThree.ets @@ -10,7 +10,7 @@ struct WebComponent { Web({ src: 'https://www.example.com/', controller: this.webviewController}) .onPageEnd(() => { // Pre-connected https://www.example1.com/ - // 第三个参数numSockets,取值范围1-6,超过6按照6处理 + // The third parameter, numSockets, has a value range of 1-6. If it exceeds 6, the parameter will be treated as 6. webview.WebviewController.prepareForPageLoad('https://www.example.com/', true, 2); }) }