{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/1408","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/1408/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/1408/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/1408/events","html_url":"https://github.com/ampproject/amphtml/issues/1408","id":126406213,"number":1408,"title":"Amp-iframe resizing postmessage restrictions","user":{"login":"NataliaLKB","id":8774970,"avatar_url":"https://avatars.githubusercontent.com/u/8774970?v=3","gravatar_id":"","url":"https://api.github.com/users/NataliaLKB","html_url":"https://github.com/NataliaLKB","followers_url":"https://api.github.com/users/NataliaLKB/followers","following_url":"https://api.github.com/users/NataliaLKB/following{/other_user}","gists_url":"https://api.github.com/users/NataliaLKB/gists{/gist_id}","starred_url":"https://api.github.com/users/NataliaLKB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NataliaLKB/subscriptions","organizations_url":"https://api.github.com/users/NataliaLKB/orgs","repos_url":"https://api.github.com/users/NataliaLKB/repos","events_url":"https://api.github.com/users/NataliaLKB/events{/privacy}","received_events_url":"https://api.github.com/users/NataliaLKB/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ampproject/amphtml/labels/Related%20to:%20Content","name":"Related to: Content","color":"d4c5f9"},{"url":"https://api.github.com/repos/ampproject/amphtml/labels/Type:%20Enhancement","name":"Type: Enhancement","color":"fef2c0"},{"url":"https://api.github.com/repos/ampproject/amphtml/labels/Type:%20Request","name":"Type: Request","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"sriramkrish85","id":1037311,"avatar_url":"https://avatars.githubusercontent.com/u/1037311?v=3","gravatar_id":"","url":"https://api.github.com/users/sriramkrish85","html_url":"https://github.com/sriramkrish85","followers_url":"https://api.github.com/users/sriramkrish85/followers","following_url":"https://api.github.com/users/sriramkrish85/following{/other_user}","gists_url":"https://api.github.com/users/sriramkrish85/gists{/gist_id}","starred_url":"https://api.github.com/users/sriramkrish85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sriramkrish85/subscriptions","organizations_url":"https://api.github.com/users/sriramkrish85/orgs","repos_url":"https://api.github.com/users/sriramkrish85/repos","events_url":"https://api.github.com/users/sriramkrish85/events{/privacy}","received_events_url":"https://api.github.com/users/sriramkrish85/received_events","type":"User","site_admin":false},"milestone":null,"comments":13,"created_at":"2016-01-13T12:14:18Z","updated_at":"2016-01-27T04:12:29Z","closed_at":null,"body":"An enquiry regarding the [resizing](https://github.com/ampproject/amphtml/blob/38fbbdd824ed1887c9258b06627fcc394d6310dd/extensions/amp-iframe/amp-iframe.md#iframe-resizing) of `amp-iframes`.\r\n\r\nThe postmessage requirements are quite strict. At the moment AMP requires:\r\n\r\n``` js\r\n{\r\n  sentinel: 'amp',\r\n  type: 'embed-size',\r\n  height: height\r\n}\r\n```\r\n\r\nWe have an existing resize postmessage in this format:\r\n\r\n``` js\r\n{\r\n   type: 'set-height',\r\n   value: height\r\n}\r\n```\r\n\r\nWould you consider adding an optional attributes to amp-iframe to specify the type and value to listen for? An example could be:\r\n\r\n``` html\r\n<amp-iframe\r\n  message-type=\"set-height\" \r\n  message-height-key=\"value\" \r\n  resizable  \r\n  src=\"..\"\r\n>\r\n```"},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/175381909","html_url":"https://github.com/ampproject/amphtml/issues/1408#issuecomment-175381909","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/1408","id":175381909,"user":{"login":"sriramkrish85","id":1037311,"avatar_url":"https://avatars.githubusercontent.com/u/1037311?v=3","gravatar_id":"","url":"https://api.github.com/users/sriramkrish85","html_url":"https://github.com/sriramkrish85","followers_url":"https://api.github.com/users/sriramkrish85/followers","following_url":"https://api.github.com/users/sriramkrish85/following{/other_user}","gists_url":"https://api.github.com/users/sriramkrish85/gists{/gist_id}","starred_url":"https://api.github.com/users/sriramkrish85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sriramkrish85/subscriptions","organizations_url":"https://api.github.com/users/sriramkrish85/orgs","repos_url":"https://api.github.com/users/sriramkrish85/repos","events_url":"https://api.github.com/users/sriramkrish85/events{/privacy}","received_events_url":"https://api.github.com/users/sriramkrish85/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T04:12:29Z","updated_at":"2016-01-27T04:12:29Z","body":"@cramforce so are we planning to do something like this?\r\nSomething like this?\r\n\r\n```\r\n<amp-iframe\r\n  data-resize-message-identification=\"type=set-height\" \r\n  data-resize-value=\"value\" \r\n  resizable  \r\n  src=\"..\"\r\n>\r\n```"}}