Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Polymer docs for event handling should cover argument passing #2327

@arthurevans

Description

@arthurevans

From @000drax on September 8, 2017 23:27

Polymer docs for event triggering should really show an example that involves passing an argument into the function.

This StackOverflow answer did what I needed, but I imagine this use case is so common that it should be in the actual docs.

https://stackoverflow.com/a/40205828

By the way, is the SO answer the canoncial way to do this? It is a bit inconsistent/surprising that some parts of Polymer allow for directly passing arguments into functions via the template (e.g. the "if" argument within a dom-if allows syntax like "myfunction(prop)"), but events don't allow this.

Docs:
https://www.polymer-project.org/1.0/docs/devguide/events
https://www.polymer-project.org/2.0/docs/devguide/events

Copied from original issue: Polymer/polymer#4834

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions