{"action":"opened","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/4841","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/4841/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/4841/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/4841/events","html_url":"https://github.com/ampproject/amphtml/issues/4841","id":175367964,"number":4841,"title":"window.context.noContentAvailable no longer sets AMP-AD to display None","user":{"login":"antnativo","id":17415760,"avatar_url":"https://avatars.githubusercontent.com/u/17415760?v=3","gravatar_id":"","url":"https://api.github.com/users/antnativo","html_url":"https://github.com/antnativo","followers_url":"https://api.github.com/users/antnativo/followers","following_url":"https://api.github.com/users/antnativo/following{/other_user}","gists_url":"https://api.github.com/users/antnativo/gists{/gist_id}","starred_url":"https://api.github.com/users/antnativo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antnativo/subscriptions","organizations_url":"https://api.github.com/users/antnativo/orgs","repos_url":"https://api.github.com/users/antnativo/repos","events_url":"https://api.github.com/users/antnativo/events{/privacy}","received_events_url":"https://api.github.com/users/antnativo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-06T22:33:47Z","updated_at":"2016-09-06T22:33:47Z","closed_at":null,"body":"@cramforce @lannka @jridgewell I was once able to hide an AMP-AD if there was not content for the ad by using **window.context.noContentAvailable()**. However, I am not unable to collapse the ads using this function. What has changed and what is available that provides the same functionality without the use of a fallback tag.\r\n\r\nbelow used to work: \r\n`        if (typeof resp.placements == \"undefined\" || !(resp.placements instanceof Array) || resp.placements.length == 0 ) {\r\n            (this.ampMode && typeof window.context.noContentAvailable != \"undefined\") ? window.context.noContentAvailable() : null;\r\n            return; // if the response doesn't have placements, there is nothing to be done as this is not a valid publication section.\r\n        }`\r\n\r\n"}}
{"actor":{"display_login":"antnativo"}}