ExternalDestination 跳转到外部链接
1. 结构声明
- TS Declaration
 - JSON Schema
 
class ExternalDestination extends LogicItem {
    link: LogicItem;
    target: '_self' | '_blank' | '_parent' | '_top' = '_self';
    anchor?: Anchor;
}
{
    "type": "object",
    "properties": {
        "composedBy": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "changedTime": {
            "$ref": "#/definitions/long"
        },
        "label": {
            "type": "string"
        },
        "description": {
            "type": "string"
        },
        "folded": {
            "type": "boolean"
        },
        "offsetX": {
            "type": "number"
        },
        "offsetY": {
            "type": "number"
        },
        "typeAnnotation": {
            "$ref": "#/definitions/TypeAnnotation"
        },
        "breakpoint": {
            "type": "string",
            "enum": [
                "ENABLED",
                "DISABLED"
            ]
        },
        "link": {
            "$ref": "#/definitions/LogicItem"
        },
        "target": {
            "type": "string",
            "enum": [
                "_self",
                "_blank",
                "_parent",
                "_top"
            ]
        },
        "anchor": {
            "$ref": "#/definitions/Anchor"
        }
    },
    "required": [
        "link",
        "target"
    ],
    "additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
 - YAML
 
{
    "concept": "ExternalDestination",
    "link": {
        "concept": "StringLiteral",
        "value": "https://nasl.codewave.163.com",
        "folded": false
    },
    "target": "_self"
}
concept: ExternalDestination
link:
  concept: StringLiteral
  value: https://nasl.codewave.163.com
  folded: false
target: _self
对应的代码如下:
- 文本化 NASL
 - Natural TS
 
goto 'https://nasl.codewave.163.com'("_self")
nasl.ui.gotoLink('https://nasl.codewave.163.com', undefined)