Skip to content

feat(runtime)!: remove the JavaScript API from before named arguments - #686

Open
route wants to merge 1 commit into
mainfrom
feat/js-api-0.21
Open

route wants to merge 1 commit into
mainfrom
feat/js-api-0.21

Conversation

@route

@route route commented Oct 29, 2026

Copy link
Copy Markdown
Member

Follow-up to #673 for 0.21: every script runs the new way, the old API and its switches are gone.

  • Keyword arguments are named parameters, a function declaration takes positional arguments only
  • Promises and thenables are awaited, all statements run and the last one's value is returned
  • Node#evaluate returns nodes and dates
  • A script timeout is always bounded, by timeout: or the page's timeout

Removed: Runtime::Legacy, Utils::Deprecate, #evaluate_async, #evaluate_func, #evaluate_on, FERRUM_JS_API and FERRUM_DEPRECATION_WARNINGS, plus the scanner parts only the old API needed. The upgrade notes are in docs/13-javascript.md#upgrading-to-021.

Every script runs the new way: keyword arguments are named parameters, a function declaration takes positional
arguments only, promises are awaited, a script returns the value of its last statement, and Node#evaluate returns
nodes and dates. A script timeout is always bounded, by timeout: or the page's timeout.

Removes Runtime::Legacy, Utils::Deprecate, evaluate_async, evaluate_func, evaluate_on, FERRUM_JS_API and
FERRUM_DEPRECATION_WARNINGS, along with the scanner parts only the old API needed.
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.

1 participant