Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try evaluating code with parentheses before without parentheses #357

Merged
merged 1 commit into from
Nov 8, 2019

Conversation

cpsievert
Copy link
Collaborator

Closes #356.

The problem with evaluating without parentheses first is that named function declarations are valid expressions that return undefined (whereas evaluating with parentheses returns the function, as expected).

It's true there may be weird corner-cases where switching this order leads to something else that's undesirable, but we've been operating with the 'with parentheses' model for so long that switching the ordering now will minimize backward-compatibility issues

ramnathv#356.

The problem with evaluating without parentheses first is that named function declarations are valid expressions that return undefined (whereas evaluating with parentheses returns the function, as expected).

It's true there may be weird corner-cases where switching this order leads to something else that's undesirable, but we've been operating with the 'with parentheses' model for so long that switching the ordering now will minimize backward-compatibility issues
@cpsievert
Copy link
Collaborator Author

A test for this functionality is here rstudio/shiny-examples#177

@jcheng5 jcheng5 merged commit b357323 into ramnathv:master Nov 8, 2019
schloerke added a commit to schloerke/htmlwidgets that referenced this pull request Sep 30, 2020
* upstream/master:
  Bump dev version
  Export JSEvals (ramnathv#381)
  Add missing roxygenize step (ramnathv#370)
  Add reportTheme arg to shinyWidgetOutput() (ramnathv#361)
  Try evaluating code with parentheses before without parentheses, closes ramnathv#356. (ramnathv#357)
  Bump version for development
  v1.5.1 release candidate (ramnathv#353)
  Add a comment; abstract out duplication in logic (ramnathv#354)
  Prevent staticRender from being called unconditionally when htmlwidgets.js is loaded after page load
  Bump version; update NEWS
  Use  to schedule staticRender() iff jQuery 3 or higher is present in shinyMode
  Bump version
  Bump version for release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Troubles with the use of dygraphs
2 participants