ampproject / ampproject/amphtml

amp-bind: Get initial text value of elements

Open
#14,859 10 comments 0 reactions 0 assignees View on GitHub
P3: When Possible Stale Type: Feature Request WG: runtime
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Hi,

event.value is used to get the value of the selected option on a drop-down select HTML element, however, I'm unable to get the text within that element (not the value) when it is selected.

Is there anything I'm missing?

Why was String.replace() not included in the white-listed options for string manipulation? (Which is a solution to the above, since the display of the item and it's value differs)

Contributor guide

Open the contributing guide

Research direction

Start by tracing amp-bind's handling of event.value for selected options and the whitelist for string manipulation. Review the issue discussion to determine whether the requested outcome is access to an option's display text, allowing String.replace(), or both; done should include a decided API behavior and corresponding coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.