本文整理汇总了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 });
}
}