Title: Different casting rules in setTimeout/setInterval in nativescript · Issue #7567 · NativeScript/NativeScript · GitHub
Open Graph Title: Different casting rules in setTimeout/setInterval in nativescript · Issue #7567 · NativeScript/NativeScript
X Title: Different casting rules in setTimeout/setInterval in nativescript · Issue #7567 · NativeScript/NativeScript
Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.0.2 Cross-platform modules: 6.0.1 Android...
Open Graph Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.0...
X Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.0...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/7567
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Different casting rules in setTimeout/setInterval in nativescript","articleBody":"**Environment**\r\nProvide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):\r\n - CLI: 6.0.2\r\n - Cross-platform modules: 6.0.1\r\n - Android Runtime: 6.0.0\r\n - iOS Runtime:\r\n - Plugin(s):\r\n\r\n**Describe the bug**\r\n\u003c!-- A clear and concise description of what the bug is. Please, explain whether it's a build time error or a runtime error. More detailed logs can be easily obtained by following the instructions in this guide: https://docs.nativescript.org/get-support#how-to-obtain-diagnostic-reports. --\u003e\r\nNativescript has different casting rules compared to browser javascript. (at least in timer.setTimeout and timer.setInterval functions).\r\n\r\n**To Reproduce**\r\n\u003c!-- Add commands used or steps taken to reproduce the behaviour. --\u003e\r\n```\r\nsetTimeout(() =\u003e console.log(\"Hello\"), false);\r\n``` \r\nFails in nativescript, but suceeds in js.\r\n\r\n**Expected behavior**\r\nCasting rules should be the same.\r\n\r\n**Sample project**\r\n\u003c!-- If possible, provide a link from the [Playground](https://play.nativescript.org) with reproduction of the problem. If not, consider attaching a sample project or link to a repository with such project. --\u003e\r\n\r\n**Additional context**\r\n\u003c!-- Add any other context about the problem here. --\u003e\r\nMany libraries out there are using code like \r\n```\r\nsetTimeout(callback, false);\r\n```\r\nwhich fails and is usually hard to debug. Was bitten by `redux-perist` lib.\r\n\r\n\r\n\u003cbountysource-plugin\u003e\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/77415766-different-casting-rules-in-settimeout-setinterval-in-nativescript?utm_campaign=plugin\u0026utm_content=tracker%2F12908224\u0026utm_medium=issues\u0026utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin\u0026utm_content=tracker%2F12908224\u0026utm_medium=issues\u0026utm_source=github).\r\n\u003c/bountysource-plugin\u003e","author":{"url":"https://github.com/miiihi","@type":"Person","name":"miiihi"},"datePublished":"2019-07-22T15:49:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/7567/NativeScript/issues/7567"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5ee5b655-3850-e081-105a-f6350dcff44a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E812:166E9D:3379013:4558F99:6971E65C |
| html-safe-nonce | 2efa5d5f75570afaed48619a4f12d15514d9ef2d3f5c368dad2b7e6822692ceb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODEyOjE2NkU5RDozMzc5MDEzOjQ1NThGOTk6Njk3MUU2NUMiLCJ2aXNpdG9yX2lkIjoiNjg3MTA1NjE1MTgyNzU3MjMxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a34abe03f4ffc7aed21924d9d2df191d70613c6671cff95ad3266b7b59d425ca |
| hovercard-subject-tag | issue:471165980 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/7567/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dc1b5083bd70ec5a68da35ae863b324d4aa3b76cb1d7a797564ff308113f5d17/NativeScript/NativeScript/issues/7567 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dc1b5083bd70ec5a68da35ae863b324d4aa3b76cb1d7a797564ff308113f5d17/NativeScript/NativeScript/issues/7567 |
| og:image:alt | Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | miiihi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 683712716975b3393656edf09255a1d488d0e68ab7b9ac97e40ecf40036f696c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ed99da4e2de688dd1056894c1eccd4c82c6bbbfe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width