diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry1/src/main/ets/entry1ability/Entry1Ability.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry1/src/main/ets/entry1ability/Entry1Ability.ets index d9e4566e76ab32f3b564b3fb66bb6381bd623d3e..8220e472870ae1148574840485fd7e7d826647ea 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry1/src/main/ets/entry1ability/Entry1Ability.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry1/src/main/ets/entry1ability/Entry1Ability.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +// [Start initialize_kernel_in_onCreate_and_pre_connect_to_homepage] import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { window } from '@kit.ArkUI'; @@ -28,11 +28,12 @@ export default class Entry1Ability extends UIAbility { AppStorage.setOrCreate('abilityWant', want); console.log('EntryAbility onCreate done'); } - + // [StartExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] onDestroy(): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); } - + // [EndExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] + // [StartExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] onWindowStageCreate(windowStage: window.WindowStage): void { // Main window is created, set main page for this ability hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); @@ -45,19 +46,25 @@ export default class Entry1Ability extends UIAbility { hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); }); } - + // [EndExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] + // [StartExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] onWindowStageDestroy(): void { // Main window is destroyed, release UI related resources hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); } - + // [EndExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] + // [StartExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] onForeground(): void { // Ability has brought to foreground hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); } + // [EndExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] + // [StartExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] onBackground(): void { // Ability has back to background hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); } + // [EndExclude initialize_kernel_in_onCreate_and_pre_connect_to_homepage] } +// [End initialize_kernel_in_onCreate_and_pre_connect_to_homepage] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry1/src/main/ets/pages/Index.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry1/src/main/ets/pages/Index.ets index a22d42d7ba6e9bbbda48251f4b421139778d3d6f..1a2fe4d9484543336d2e6c7bfce18192eb7278aa 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry1/src/main/ets/pages/Index.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry1/src/main/ets/pages/Index.ets @@ -12,12 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +// [Start previously_connect_in_onAppear_to_pages_being_loaded] import { webview } from '@kit.ArkWeb'; - +// [StartExclude previously_connect_in_onAppear_to_pages_being_loaded] function resourceToString(resource: Resource) { return getContext().resourceManager.getStringSync(resource); } +// [EndExclude previously_connect_in_onAppear_to_pages_being_loaded] @Entry @Component @@ -41,3 +42,4 @@ struct WebComponent { } } } +//[End previously_connect_in_onAppear_to_pages_being_loaded] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/Prefetching.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/Prefetching.ets index 9879456138b9129f69bda95a5ced976714a4ecfa..57d3b8e6e3b826c4740f5812e69e7138d2f89cd5 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/Prefetching.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/Prefetching.ets @@ -12,13 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +// [Start on_page_end_triggers_preload_of_next_page] import { webview } from '@kit.ArkWeb'; - +// [StartExclude on_page_end_triggers_preload_of_next_page] function resourceToString(resource: Resource) { return getContext().resourceManager.getStringSync(resource); } - +// [EndExclude on_page_end_triggers_preload_of_next_page] @Entry @Component struct WebComponent { @@ -34,3 +34,4 @@ struct WebComponent { } } } +// [End on_page_end_triggers_preload_of_next_page] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/PrefetchingAPOSTRequest_one.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/PrefetchingAPOSTRequest_one.ets index fec3d997018d986a26117953bb2f147f1203e23c..3a77ecbda2d0140ec373a0cbcc085f7cc74c7e78 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/PrefetchingAPOSTRequest_one.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/PrefetchingAPOSTRequest_one.ets @@ -12,13 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +//[Start prefetch_post_request_on_page_end_clear_cache] import { webview } from '@kit.ArkWeb'; - +// [StartExclude prefetch_post_request_on_page_end_clear_cache] function resourceToString(resource: Resource) { return getContext().resourceManager.getStringSync(resource); } - +// [EndExclude prefetch_post_request_on_page_end_clear_cache] @Entry @Component struct WebComponent { @@ -44,3 +44,4 @@ struct WebComponent { } } } +//[End prefetch_post_request_on_page_end_clear_cache] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/PrefetchingAPOSTRequest_three.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/PrefetchingAPOSTRequest_three.ets index 7fec456ea93d7a4fc9c7e4395af0ecf5976bd6b6..27f0bd71d382de1334e8563b874ac56d03b4ee24 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/PrefetchingAPOSTRequest_three.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry2/src/main/ets/pages/PrefetchingAPOSTRequest_three.ets @@ -12,13 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +// [Start on_page_end_trigger_prefetch_post_request_access_page] import { webview } from '@kit.ArkWeb'; - +// [StartExclude on_page_end_trigger_prefetch_post_request_access_page] function resourceToString(resource: Resource) { return getContext().resourceManager.getStringSync(resource); } - +// [EndExclude on_page_end_trigger_prefetch_post_request_access_page] @Entry @Component struct WebComponent { @@ -40,4 +40,4 @@ struct WebComponent { } } } - +//[End on_page_end_trigger_prefetch_post_request_access_page] diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/entry3ability/Entry3Ability.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/entry3ability/Entry3Ability.ets index 22b3bbdccc6b164dc9b9a136aeac1064a8381cc4..70e9ac6dedcc24d251a2b79c3925b3ea0215881c 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/entry3ability/Entry3Ability.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/entry3ability/Entry3Ability.ets @@ -12,23 +12,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + +// [Start save_the_uiContext_to_localstorage_in_entry_ability] import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; import { window } from '@kit.ArkUI'; +// [StartExclude save_the_uiContext_to_localstorage_in_entry_ability] +import { hilog } from '@kit.PerformanceAnalysisKit'; +// [EndExclude save_the_uiContext_to_localstorage_in_entry_ability] const localStorage: LocalStorage = new LocalStorage('uiContext'); export default class Entry3Ability extends UIAbility { public storage: LocalStorage = localStorage; + // [StartExclude save_the_uiContext_to_localstorage_in_entry_ability] onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); } - + // [EndExclude save_the_uiContext_to_localstorage_in_entry_ability] + // [StartExclude save_the_uiContext_to_localstorage_in_entry_ability] onDestroy(): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); } - + // [EndExclude save_the_uiContext_to_localstorage_in_entry_ability] onWindowStageCreate(windowStage: window.WindowStage) { windowStage.loadContent('pages/Index', this.storage, (err, data) => { if (err.code) { @@ -39,18 +44,23 @@ export default class Entry3Ability extends UIAbility { }); } + // [StartExclude save_the_uiContext_to_localstorage_in_entry_ability] onWindowStageDestroy(): void { // Main window is destroyed, release UI related resources hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); } - + // [EndExclude save_the_uiContext_to_localstorage_in_entry_ability] + // [StartExclude save_the_uiContext_to_localstorage_in_entry_ability] onForeground(): void { // Ability has brought to foreground hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); } - + // [EndExclude save_the_uiContext_to_localstorage_in_entry_ability] + // [StartExclude save_the_uiContext_to_localstorage_in_entry_ability] onBackground(): void { // Ability has back to background hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); } + // [EndExclude save_the_uiContext_to_localstorage_in_entry_ability] } +// [End save_the_uiContext_to_localstorage_in_entry_ability] diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/BusinessWebview.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/BusinessWebview.ets index abc50a3c5b529609e44a7660f2482b3583663087..b48330fdcae7fd4dbb82e646a3bbba77a1ca76c0 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/BusinessWebview.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/BusinessWebview.ets @@ -12,7 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + +// [Start write_code_for_business_components] import { BuilderData } from './DynamicComponent'; @Builder @@ -23,3 +24,4 @@ function webBuilder(data: BuilderData) { } export const businessWebview = wrapBuilder(webBuilder); +// [End write_code_for_business_components] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/DynamicComponent.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/DynamicComponent.ets index ff0f85f0e5d16ba9bb59dc5fe7659cc67adc5f41..d4322b01d0f43be59239fa56ea6a67b76c5cbf7b 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/DynamicComponent.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/DynamicComponent.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +// [Start underlying_code_required_for_dynamic_components] import { NodeController, BuilderNode, FrameNode, UIContext } from '@kit.ArkUI'; export interface BuilderData { @@ -57,3 +57,4 @@ export const createNode = (wrappedBuilder: WrappedBuilder, data: baseNode.initWeb(data.url, data.controller); return baseNode; } +// [End underlying_code_required_for_dynamic_components] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/Index.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/Index.ets index 091313eddd2bda42843ef0f420b532df5c245e1c..434a2ccf53015a2a93e547b040e2a60058c0afb8 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/Index.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/Index.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start dynamic_webview_component_loading] import { webview } from '@kit.ArkWeb'; import { NodeController } from '@kit.ArkUI'; import { createNode } from "./DynamicComponent"; @@ -53,3 +54,4 @@ struct Index { } } } +// [End dynamic_webview_component_loading] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/PrecompileConfig.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/PrecompileConfig.ets index ed7f2c6e94140135d7c464b47cf5f6b1769cc66a..029801052b84fa9ae36358a818309cb92670d4ef 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/PrecompileConfig.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/PrecompileConfig.ets @@ -12,7 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + +// [Start compile_resource_allocation_information] import { webview } from '@kit.ArkWeb' function resourceToString(resource: Resource) { @@ -37,3 +38,4 @@ export let configs: Config[] = [ } } ] +// [End compile_resource_allocation_information] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/PrecompileWebview.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/PrecompileWebview.ets index 214da820e83610d05d425b2ed54c40ca58909ae4..20538a0fe64bfc8f90cdc39c4664b1636e0aab10 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/PrecompileWebview.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry3/src/main/ets/pages/PrecompileWebview.ets @@ -12,7 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + +// [Start read_local_js_resource_from_rawfile_dir_via_file_api] import { BuilderData } from './DynamicComponent'; import { Config, configs } from './PrecompileConfig'; @@ -51,3 +52,4 @@ async function readRawFile(path: string) { return new Uint8Array(0); } } +// [End read_local_js_resource_from_rawfile_dir_via_file_api] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/entry4ability/Entry4Ability.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/entry4ability/Entry4Ability.ets index 0f4fa9bb16babfedfc5fd94fd56d68d74407ddfa..24119194e26614a56f5ebdaf5863c49908c5f0fe 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/entry4ability/Entry4Ability.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/entry4ability/Entry4Ability.ets @@ -12,23 +12,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + +// [Start save_uiContext_to_localstorage_in_entry_ability] import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; import { window } from '@kit.ArkUI'; +// [StartExclude save_uiContext_to_localstorage_in_entry_ability] +import { hilog } from '@kit.PerformanceAnalysisKit'; +// [EndExclude save_uiContext_to_localstorage_in_entry_ability] const localStorage: LocalStorage = new LocalStorage('uiContext'); export default class Entry4Ability extends UIAbility { public storage: LocalStorage = localStorage; + // [StartExclude save_uiContext_to_localstorage_in_entry_ability] onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); } + // [EndExclude save_uiContext_to_localstorage_in_entry_ability] + // [StartExclude save_uiContext_to_localstorage_in_entry_ability] onDestroy(): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); } - + // [EndExclude save_uiContext_to_localstorage_in_entry_ability] onWindowStageCreate(windowStage: window.WindowStage) { windowStage.loadContent('pages/Index', this.storage, (err, data) => { if (err.code) { @@ -38,19 +44,23 @@ export default class Entry4Ability extends UIAbility { this.storage.setOrCreate('uiContext', windowStage.getMainWindowSync().getUIContext()); }); } - + // [StartExclude save_uiContext_to_localstorage_in_entry_ability] onWindowStageDestroy(): void { // Main window is destroyed, release UI related resources hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); } - + // [EndExclude save_uiContext_to_localstorage_in_entry_ability] + // [StartExclude save_uiContext_to_localstorage_in_entry_ability] onForeground(): void { // Ability has brought to foreground hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); } - + // [EndExclude save_uiContext_to_localstorage_in_entry_ability] + // [StartExclude save_uiContext_to_localstorage_in_entry_ability] onBackground(): void { // Ability has back to background hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); } + // [EndExclude save_uiContext_to_localstorage_in_entry_ability] } +// [End save_uiContext_to_localstorage_in_entry_ability] diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/BusinessWebview.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/BusinessWebview.ets index abc50a3c5b529609e44a7660f2482b3583663087..9bc8a28fae23f53fab0433556e56798f7b54b0b8 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/BusinessWebview.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/BusinessWebview.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +// [Start write_code_for_business_components] import { BuilderData } from './DynamicComponent'; @Builder @@ -23,3 +23,4 @@ function webBuilder(data: BuilderData) { } export const businessWebview = wrapBuilder(webBuilder); +// [End write_code_for_business_components] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/DynamicComponent.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/DynamicComponent.ets index ff0f85f0e5d16ba9bb59dc5fe7659cc67adc5f41..d4322b01d0f43be59239fa56ea6a67b76c5cbf7b 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/DynamicComponent.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/DynamicComponent.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +// [Start underlying_code_required_for_dynamic_components] import { NodeController, BuilderNode, FrameNode, UIContext } from '@kit.ArkUI'; export interface BuilderData { @@ -57,3 +57,4 @@ export const createNode = (wrappedBuilder: WrappedBuilder, data: baseNode.initWeb(data.url, data.controller); return baseNode; } +// [End underlying_code_required_for_dynamic_components] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/Index.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/Index.ets index ce2df7d672826a56de0d3097e1c71410713dc480..42fb5389701472c2a44fbc56eccfc531217e5c4e 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/Index.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/Index.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start dynamic_webview_component_loading] import { webview } from '@kit.ArkWeb'; import { NodeController } from '@kit.ArkUI'; import { createNode } from "./DynamicComponent"; @@ -53,3 +54,4 @@ struct Index { } } } +// [End dynamic_webview_component_loading] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/InjectWebview.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/InjectWebview.ets index 1342d480f1ed850658435d8955cb19e34fce3d79..8d61a652b64ce27ad9ae61d5392e77117483fb77 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/InjectWebview.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/InjectWebview.ets @@ -12,7 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + +// [Start local_resources_content_read_from_rawfile_directory_by_file_operation] import { webview } from '@kit.ArkWeb'; import { resourceConfigs } from './Resource'; import { BuilderData } from './DynamicComponent'; @@ -60,3 +61,4 @@ export async function readRawFile(url: string) { return new Uint8Array(0); } } +// [End local_resources_content_read_from_rawfile_directory_by_file_operation] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/Resource.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/Resource.ets index c4c6d0ac106a3472a5b6a33bb9806c1fe9ce941c..99f5dc7faee11126dc5480283b8bce6419f0160d 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/Resource.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/AcceleratePageAccess/entry4/src/main/ets/pages/Resource.ets @@ -12,13 +12,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import { webview } from '@kit.ArkWeb'; +// [Start compile_resource_allocation_information] +import { webview } from '@kit.ArkWeb'; +// [StartExclude compile_resource_allocation_information] function resourceToString(resource: Resource) { return getContext().resourceManager.getStringSync(resource); } - +// [EndExclude compile_resource_allocation_information] export interface ResourceConfig { urlList: Array, type: webview.OfflineResourceType, @@ -52,3 +53,4 @@ export const resourceConfigs: ResourceConfig[] = [ ] }, ]; +// [End compile_resource_allocation_information] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/CrossApplicationRedirection.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/CrossApplicationRedirection.ets index b65fcd6f3e5e653d36efdef0823807177c805f8e..fcabd906d8c70446a512e3cdea6da8c7abef344a 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/CrossApplicationRedirection.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/CrossApplicationRedirection.ets @@ -15,7 +15,7 @@ import { webview } from '@kit.ArkWeb'; import { call } from '@kit.TelephonyKit'; - +// [Start click_link_call_html_to_reach_phone_dialing_screen] @Entry @Component struct WebComponent { @@ -45,3 +45,4 @@ struct WebComponent { } } } +//[End click_link_call_html_to_reach_phone_dialing_screen] diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/HistoryNavigati.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/HistoryNavigati.ets index 1798b604d2d8e5e8c8d4f2299a374ca27a1479e9..cf577c6cbf0c81e5995f9f18c2560fc73a455733 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/HistoryNavigati.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/HistoryNavigati.ets @@ -15,6 +15,7 @@ import { webview } from '@kit.ArkWeb'; +// [Start button_click_trigger_back] @Entry @Component struct WebComponent { @@ -32,3 +33,4 @@ struct WebComponent { } } } +// [End button_click_trigger_back] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/PageRedirection.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/PageRedirection.ets index db97926478b9036088b75bced3f185db6a9feb5a..7693f2044b53ac19d8188e46d3891bca58c06815 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/PageRedirection.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/PageRedirection.ets @@ -16,6 +16,7 @@ import { webview } from '@kit.ArkWeb'; import { router } from '@kit.ArkUI'; +// [Start index_load_route_link_to_profile] @Entry @Component struct WebComponent { @@ -39,3 +40,4 @@ struct WebComponent { } } } +// [End index_load_route_link_to_profile] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/ProfilePage.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/ProfilePage.ets index 34f30365557ce8c1c895c002c639cac997111827..59c3c59c952197ba2ae451d84747ac183cbb1fb5 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/ProfilePage.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/ets/pages/ProfilePage.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +// [Start navigate_to_profile_page] @Entry @Component struct ProfilePage { @@ -25,3 +25,4 @@ struct ProfilePage { } } } +// [End navigate_to_profile_page] \ No newline at end of file diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/resources/rawfile/call.html b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/resources/rawfile/call.html index 5103a528c59db1ee661938acb0a2c421fb2b515b..f61401cc7f679e5659572a4b3ee7d8ca5b2acde6 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/resources/rawfile/call.html +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/resources/rawfile/call.html @@ -13,6 +13,7 @@ * limitations under the License. */ + diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/resources/rawfile/route.html b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/resources/rawfile/route.html index c597d31c9ac927af32fc6ab8db9cbac123753a3c..5603383333765f663d9f8fd648cade856770c0f1 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/resources/rawfile/route.html +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/ManagePageRedirectNav/entry/src/main/resources/rawfile/route.html @@ -13,6 +13,7 @@ * limitations under the License. */ + diff --git a/code/DocsSample/ArkWeb/SetBasicAttrsEvts/SetBasicAttrsEvtsTwo/entry/src/main/module.json5 b/code/DocsSample/ArkWeb/SetBasicAttrsEvts/SetBasicAttrsEvtsTwo/entry/src/main/module.json5 index 3e9e30c87ccd2e805632b79f4426344551a29d6c..8086d1ff59c6849a5c1d4664b9e9fa1262858570 100755 --- a/code/DocsSample/ArkWeb/SetBasicAttrsEvts/SetBasicAttrsEvtsTwo/entry/src/main/module.json5 +++ b/code/DocsSample/ArkWeb/SetBasicAttrsEvts/SetBasicAttrsEvtsTwo/entry/src/main/module.json5 @@ -62,6 +62,7 @@ ] } ], + // [Start sensor_permission_declaration_for_accel_gyro_motion] "requestPermissions": [ { "name": "ohos.permission.INTERNET" @@ -72,6 +73,7 @@ { "name" : "ohos.permission.GYROSCOPE" // 陀螺仪权限 } - ] + ], + // [End sensor_permission_declaration_for_accel_gyro_motion] } } \ No newline at end of file