{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/176570697","pull_request_review_id":106299889,"id":176570697,"diff_hunk":"@@ -0,0 +1,97 @@\n+/**\n+ * Copyright 2018 The AMP HTML Authors. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS-IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+import {A4AVariableSource} from '../../amp-a4a/0.1/a4a-variable-source';\n+import {Renderer} from './amp-ad-type-defs';\n+import {createElementWithAttributes} from '../../../src/dom';\n+import {dev} from '../../../src/log';\n+import {dict} from '../../../src/utils/object';\n+import {getDefaultBootstrapBaseUrl} from '../../../src/3p-frame';\n+import {\n+  installFriendlyIframeEmbed,\n+  setFriendlyIframeEmbedVisible,\n+} from '../../../src/friendly-iframe-embed';\n+import {installUrlReplacementsForEmbed} from '../../../src/service/url-replacements-impl';\n+import {setStyle} from '../../../src/style';\n+\n+/**\n+ * Render a validated AMP creative directly in the parent page.\n+ */\n+export class FriendlyFrameRenderer extends Renderer {\n+\n+  constructor() {\n+    super();\n+    /** @type {?Element} */\n+    this.iframe = null;\n+  }\n+\n+  /** @override */\n+  render(context, element, creativeData) {","path":"extensions/amp-a4a/0.1/amp-ad-render.js","position":null,"original_position":42,"commit_id":"b26e76a44f4654aa3e1fbe44911bca4b7ae7ce0b","original_commit_id":"65d810f61858010d0de1218320a7184d8595703e","user":{"login":"zhouyx","id":5419904,"avatar_url":"https://avatars0.githubusercontent.com/u/5419904?v=4","gravatar_id":"","url":"https://api.github.com/users/zhouyx","html_url":"https://github.com/zhouyx","followers_url":"https://api.github.com/users/zhouyx/followers","following_url":"https://api.github.com/users/zhouyx/following{/other_user}","gists_url":"https://api.github.com/users/zhouyx/gists{/gist_id}","starred_url":"https://api.github.com/users/zhouyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhouyx/subscriptions","organizations_url":"https://api.github.com/users/zhouyx/orgs","repos_url":"https://api.github.com/users/zhouyx/repos","events_url":"https://api.github.com/users/zhouyx/events{/privacy}","received_events_url":"https://api.github.com/users/zhouyx/received_events","type":"User","site_admin":false},"body":"In that case, let try not to pass `this` as the context. \r\nI suggest we create a API interface that has `applyFillContent` and `isInViewport` if these two functions are always required. Then each context must implement these two functions. What do you think. ","created_at":"2018-03-22T20:59:51Z","updated_at":"2018-03-22T20:59:51Z","html_url":"https://github.com/ampproject/amphtml/pull/14135#discussion_r176570697","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/14135","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/176570697"},"html":{"href":"https://github.com/ampproject/amphtml/pull/14135#discussion_r176570697"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/14135"}},"in_reply_to_id":175968735},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/14135","id":176251311,"html_url":"https://github.com/ampproject/amphtml/pull/14135","diff_url":"https://github.com/ampproject/amphtml/pull/14135.diff","patch_url":"https://github.com/ampproject/amphtml/pull/14135.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/14135","number":14135,"state":"open","locked":false,"title":"Modular FriendlyFrameRenderer","user":{"login":"glevitzky","id":20518281,"avatar_url":"https://avatars1.githubusercontent.com/u/20518281?v=4","gravatar_id":"","url":"https://api.github.com/users/glevitzky","html_url":"https://github.com/glevitzky","followers_url":"https://api.github.com/users/glevitzky/followers","following_url":"https://api.github.com/users/glevitzky/following{/other_user}","gists_url":"https://api.github.com/users/glevitzky/gists{/gist_id}","starred_url":"https://api.github.com/users/glevitzky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glevitzky/subscriptions","organizations_url":"https://api.github.com/users/glevitzky/orgs","repos_url":"https://api.github.com/users/glevitzky/repos","events_url":"https://api.github.com/users/glevitzky/events{/privacy}","received_events_url":"https://api.github.com/users/glevitzky/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-20T16:37:38Z","updated_at":"2018-03-22T20:59:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d2f1c8516641d1f152a488c623229488fcd3f06","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":596633554,"url":"https://api.github.com/repos/ampproject/amphtml/labels/cla:%20yes","name":"cla: yes","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/14135/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/14135/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/14135/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/b26e76a44f4654aa3e1fbe44911bca4b7ae7ce0b","head":{"label":"glevitzky:templatevalidator","ref":"templatevalidator","sha":"b26e76a44f4654aa3e1fbe44911bca4b7ae7ce0b","user":{"login":"glevitzky","id":20518281,"avatar_url":"https://avatars1.githubusercontent.com/u/20518281?v=4","gravatar_id":"","url":"https://api.github.com/users/glevitzky","html_url":"https://github.com/glevitzky","followers_url":"https://api.github.com/users/glevitzky/followers","following_url":"https://api.github.com/users/glevitzky/following{/other_user}","gists_url":"https://api.github.com/users/glevitzky/gists{/gist_id}","starred_url":"https://api.github.com/users/glevitzky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glevitzky/subscriptions","organizations_url":"https://api.github.com/users/glevitzky/orgs","repos_url":"https://api.github.com/users/glevitzky/repos","events_url":"https://api.github.com/users/glevitzky/events{/privacy}","received_events_url":"https://api.github.com/users/glevitzky/received_events","type":"User","site_admin":false},"repo":{"id":107138995,"name":"amphtml","full_name":"glevitzky/amphtml","owner":{"login":"glevitzky","id":20518281,"avatar_url":"https://avatars1.githubusercontent.com/u/20518281?v=4","gravatar_id":"","url":"https://api.github.com/users/glevitzky","html_url":"https://github.com/glevitzky","followers_url":"https://api.github.com/users/glevitzky/followers","following_url":"https://api.github.com/users/glevitzky/following{/other_user}","gists_url":"https://api.github.com/users/glevitzky/gists{/gist_id}","starred_url":"https://api.github.com/users/glevitzky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glevitzky/subscriptions","organizations_url":"https://api.github.com/users/glevitzky/orgs","repos_url":"https://api.github.com/users/glevitzky/repos","events_url":"https://api.github.com/users/glevitzky/events{/privacy}","received_events_url":"https://api.github.com/users/glevitzky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glevitzky/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/glevitzky/amphtml","forks_url":"https://api.github.com/repos/glevitzky/amphtml/forks","keys_url":"https://api.github.com/repos/glevitzky/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glevitzky/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glevitzky/amphtml/teams","hooks_url":"https://api.github.com/repos/glevitzky/amphtml/hooks","issue_events_url":"https://api.github.com/repos/glevitzky/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/glevitzky/amphtml/events","assignees_url":"https://api.github.com/repos/glevitzky/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/glevitzky/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/glevitzky/amphtml/tags","blobs_url":"https://api.github.com/repos/glevitzky/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glevitzky/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glevitzky/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/glevitzky/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glevitzky/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/glevitzky/amphtml/languages","stargazers_url":"https://api.github.com/repos/glevitzky/amphtml/stargazers","contributors_url":"https://api.github.com/repos/glevitzky/amphtml/contributors","subscribers_url":"https://api.github.com/repos/glevitzky/amphtml/subscribers","subscription_url":"https://api.github.com/repos/glevitzky/amphtml/subscription","commits_url":"https://api.github.com/repos/glevitzky/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/glevitzky/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/glevitzky/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/glevitzky/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/glevitzky/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/glevitzky/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glevitzky/amphtml/merges","archive_url":"https://api.github.com/repos/glevitzky/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glevitzky/amphtml/downloads","issues_url":"https://api.github.com/repos/glevitzky/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/glevitzky/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/glevitzky/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/glevitzky/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glevitzky/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/glevitzky/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/glevitzky/amphtml/deployments","created_at":"2017-10-16T14:29:01Z","updated_at":"2017-10-16T14:29:15Z","pushed_at":"2018-03-22T18:23:38Z","git_url":"git://github.com/glevitzky/amphtml.git","ssh_url":"git@github.com:glevitzky/amphtml.git","clone_url":"https://github.com/glevitzky/amphtml.git","svn_url":"https://github.com/glevitzky/amphtml","homepage":"https://www.ampproject.org","size":414655,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"e6df6011cd2a8fadd8b9e52090172eacb879c1f7","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2018-03-22T20:47:16Z","pushed_at":"2018-03-22T20:46:51Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://www.ampproject.org","size":415480,"stargazers_count":11353,"watchers_count":11353,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2297,"mirror_url":null,"archived":false,"open_issues_count":1220,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2297,"open_issues":1220,"watchers":11353,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/14135"},"html":{"href":"https://github.com/ampproject/amphtml/pull/14135"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/14135"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/14135/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/14135/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/14135/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/b26e76a44f4654aa3e1fbe44911bca4b7ae7ce0b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"zhouyx"}}