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
sticky-ad use render-start
API
#5298
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor comments
* For ad type that don't support render-start, wait for 1 sec. | ||
* @private | ||
*/ | ||
delayAdLoad_() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is only called by layoutAd_
, we can merge it into layoutAd_
. Both methods are very short.
return getAmpStickyAd().then(obj => { | ||
const stickyAdElement = obj.ampStickyAd; | ||
const impl = stickyAdElement.implementation_; | ||
impl.ad_.isBuilt = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use () =>
for function
fixed |
I messed up with the other PR. So I created a new one which is easier for me....
refactor from #4284
Work for #4283