Skip to content

Fix addInitScript example in v9 blog post#13486

Merged
christian-bromann merged 1 commit intowebdriverio:mainfrom
Mr0grog:patch-1
Sep 1, 2024
Merged

Fix addInitScript example in v9 blog post#13486
christian-bromann merged 1 commit intowebdriverio:mainfrom
Mr0grog:patch-1

Conversation

@Mr0grog
Copy link
Contributor

@Mr0grog Mr0grog commented Sep 1, 2024

Proposed changes

In the blogpost announcing Webdriverio v9, the addInitScript() example shows a function that takes callback as a parameter, but then calls emit instead (after looking at the docs, this is clearly intending to call the parameter named callback). I changed the name of the parameter to emit to match the examples in the docs, although which name to use is pretty arbitrary.

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

Reviewers: @webdriverio/project-committers

In the blogpost announcing Webdriverio v9, the `addInitScript()` example shows a function that takes `callback` as a parameter, but then calls `emit` instead (after looking at the docs, this is clearly supposed to be the parameter named `callback`). I changed the name of the parameter to `emit` to match the examples in the actual docs, although which name to use is pretty arbitrary.
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👌

@christian-bromann christian-bromann added the PR: Docs 📝 PRs that contain changes to the documentation label Sep 1, 2024
@christian-bromann christian-bromann merged commit 0c44c68 into webdriverio:main Sep 1, 2024
@wdio-bot
Copy link
Contributor

wdio-bot commented Sep 1, 2024

Hey Mr0grog 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution.

We've sent you an email with further instructions on how to claim your expenses from our development fund.
Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at expense@webdriver.io or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

@Mr0grog Mr0grog deleted the patch-1 branch September 2, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Expensable $15 💸 PR: Docs 📝 PRs that contain changes to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants