Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor all buildImagePlaceholder_ to use createPlaceholderCallback #5344

Merged
merged 2 commits into from
Oct 3, 2016

Conversation

mkhatib
Copy link
Contributor

@mkhatib mkhatib commented Sep 30, 2016

(except YouTube for #3216)

Fixes #3212


// TODO(#5321): Investigate if this is actually the correct URL format for generated
// dynamic image.
placeholder.setAttribute('src',
Copy link
Member

Choose a reason for hiding this comment

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

do we need to move over the alt attribute to the place holder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes if alt is supported on the element we should propagate it. Will review to add it where supported

Copy link
Member

Choose a reason for hiding this comment

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

thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't support alt attribute on most of these players.

'visibility': '',
});
});
placeholder.setAttribute('noprerender', '');
Copy link
Member

Choose a reason for hiding this comment

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

was this part of the eval that this shouldn't be prerendered?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am actually not 100%. Sure was it only if the request is sending or setting cookies during prerender? I'll review the document.

In this PR u added noprerender to items that uses the same domain for loading the main content and prerender content.

Copy link
Member

Choose a reason for hiding this comment

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

SGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked the doc, doesn't seem we have problems with these, so dropping noprerender attribute from these.

@mkhatib
Copy link
Contributor Author

mkhatib commented Oct 3, 2016

PTAL 👀

@erwinmombay
Copy link
Member

LGTM. @mkhatib thanks for double checking

@mkhatib mkhatib merged commit c077e7e into ampproject:master Oct 3, 2016
@mkhatib mkhatib deleted the refactor-build-placeholder branch October 3, 2016 20:39
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