Skip to content

Timers are not standard #4384

Closed
Closed

Description

@WebReflection

tns --version 3.0.3 tested on android emulator platform version 25 and device with API 7.x

Timers are a very well spec'd primitive, universally compatible with every platform but IE < 10 ... please don't be IE < 10 😄

setTimeout(console.log, 2000, 'hello', 'world');

The expected output is the equivalent of executing console.log('hello', 'world') after 2 seconds.

Instead, NativeScript runtime does not pass arguments along.

I have no idea how much code out there give this for granted, since it works literally everywhere like this, but it broke anyway already few scripts of mine.

Please consider fixing this or report this upstream if it's a nashorn issue (I'm really new to TS I'v eno idea what's exactly behind as JS core but so far it looks most of it just works out of the box, kudos that!)

Thank you and Best Regards

Activity

  1. tsonevn commented on Jun 15, 2017

    @tsonevn
    Contributor

    Hi @WebReflection,
    Thank you for the suggestion. this could be a useful feature for the Timers in NativeScript.
    We will investigate, how it could be integrated into NativeScirpt. You could keep track on the issue for further info.

    Something more, you could also make your own PR to tns-core-modules, which implements this functionality, we will review it and if all test passed, we will include it. For further info review this article.

  2. WebReflection commented on Jun 15, 2017

    @WebReflection
    ContributorAuthor

    The PR is up and running. The code is self explanatory and it should just work but if you can tell me where to find/write tests for the extra ...args I'll try to write some.

  3. added a commit that references this issue on Jun 15, 2017
  4. atanasovg commented on Aug 17, 2017

    @atanasovg
    Contributor

    Closed with #4389

  5. lock commented on Aug 28, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  6. locked and limited conversation to collaborators on Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions