MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / _loadUrl

Method _loadUrl

packages/core/ui/web-view/index.ios.ts:226–233  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

224 }
225
226 public _loadUrl(src: string) {
227 if (src.startsWith('file:///')) {
228 const cachePath = src.substring(0, src.lastIndexOf('/'));
229 this.nativeViewProtected.loadFileURLAllowingReadAccessToURL(NSURL.URLWithString(src), NSURL.URLWithString(cachePath));
230 } else {
231 this.nativeViewProtected.loadRequest(NSURLRequest.requestWithURL(NSURL.URLWithString(src)));
232 }
233 }
234
235 public _loadData(content: string) {
236 this.nativeViewProtected.loadHTMLStringBaseURL(content, NSURL.alloc().initWithString(`file:///${knownFolders.currentApp().path}/`));

Callers 1

[srcProperty.setNative]Function · 0.45

Calls 1

lastIndexOfMethod · 0.80

Tested by

no test coverage detected