Skip to content

Replace CLICK_X and CLICK_Y in anchor href for amp-inabox.#7660

Merged
lannka merged 3 commits intoampproject:masterfrom
lannka:click_x
Feb 21, 2017
Merged

Replace CLICK_X and CLICK_Y in anchor href for amp-inabox.#7660
lannka merged 3 commits intoampproject:masterfrom
lannka:click_x

Conversation

@lannka
Copy link
Copy Markdown
Contributor

@lannka lannka commented Feb 18, 2017

Closes #6385

*/
function maybeExpandUrlParams(ampdoc, e) {
const target = closestByTag(dev().assertElement(e.target), 'A');
if (!target || !target.href) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Given you check getAttribute('href') below, seems target.href here is unnecessary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

logically it's a bit different. it could be the case that it does not have href but have ORIG_HREF_ATTRIBUTE

@lannka lannka merged commit a268161 into ampproject:master Feb 21, 2017
@lannka lannka deleted the click_x branch February 21, 2017 21:01
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
…t#7660)

* Replace CLICK_X and CLICK_Y in anchor href for amp-inabox.

* Fix lint errors.
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.

2 participants