本文整理匯總了TypeScript中@jupyterlab/services.utils.urlParse方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript utils.urlParse方法的具體用法?TypeScript utils.urlParse怎麽用?TypeScript utils.urlParse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@jupyterlab/services.utils
的用法示例。
在下文中一共展示了utils.urlParse方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: attachHelp
execute: () => {
// If help resource will generate a mixed content error, load externally.
if (LAB_IS_SECURE && utils.urlParse(command.url).protocol !== 'https:') {
window.open(command.url);
return;
}
attachHelp();
iframe.url = command.url;
showHelp();
}
示例2: newClosableIFrame
execute: args => {
const url = args['url'] as string;
const text = args['text'] as string;
// If help resource will generate a mixed content error, load externally.
if (LAB_IS_SECURE && utils.urlParse(url).protocol !== 'https:') {
window.open(url);
return;
}
let iframe = newClosableIFrame(url, text);
app.shell.addToMainArea(iframe);
app.shell.activateMain(iframe.id);
}
示例3: newIFrame
execute: args => {
const url = args['url'] as string;
const isHidden = args['isHidden'] as boolean || false;
// If help resource will generate a mixed content error, load externally.
if (LAB_IS_SECURE && utils.urlParse(url).protocol !== 'https:') {
window.open(url);
return;
}
if (iframe) {
iframe.url = url;
tracker.save(iframe);
} else {
iframe = newIFrame(url);
}
attachHelp();
if (isHidden) {
hideHelp();
} else {
showHelp();
}
}
示例4:
handleLink: (node: HTMLElement, path: string) => {
if (!utils.urlParse(path).protocol && path.indexOf('//') !== 0) {
linker.connectNode(node, CommandIDs.open, { path });
}
}