Skip to content

[Bug]: clearInterval无法取消setTimeout延时执行任务 #219

@dlcnx

Description

@dlcnx

Describe the bug

在js插件中clearInterval(taskid)无法取消setTimeout(func,msec)任务

不过却可以取消setInterval任务

To Reproduce

示例代码

let timeID = setTimeout(() => {
    logger.log("X");
}, 1000)
clearInterval(timeID)

控制台中打印出了字符X

Expected behavior

正常取消setTimeout任务

Screenshots

No response

Platform

No response

BDS Version

No response

LeviLamina Version

1.0.0

LegacyScriptEngine Version

0.9.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtodo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions