{"action":"closed","issue":{"url":"https://api.github.com/repos/dart-lang/dart-pad/issues/707","repository_url":"https://api.github.com/repos/dart-lang/dart-pad","labels_url":"https://api.github.com/repos/dart-lang/dart-pad/issues/707/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/dart-pad/issues/707/comments","events_url":"https://api.github.com/repos/dart-lang/dart-pad/issues/707/events","html_url":"https://github.com/dart-lang/dart-pad/issues/707","id":118094747,"number":707,"title":"Change async modifier to defer in Dart scripts","user":{"login":"Sfshaza","id":6293442,"avatar_url":"https://avatars.githubusercontent.com/u/6293442?v=3","gravatar_id":"","url":"https://api.github.com/users/Sfshaza","html_url":"https://github.com/Sfshaza","followers_url":"https://api.github.com/users/Sfshaza/followers","following_url":"https://api.github.com/users/Sfshaza/following{/other_user}","gists_url":"https://api.github.com/users/Sfshaza/gists{/gist_id}","starred_url":"https://api.github.com/users/Sfshaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sfshaza/subscriptions","organizations_url":"https://api.github.com/users/Sfshaza/orgs","repos_url":"https://api.github.com/users/Sfshaza/repos","events_url":"https://api.github.com/users/Sfshaza/events{/privacy}","received_events_url":"https://api.github.com/users/Sfshaza/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/dart-pad/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/dart-lang/dart-pad/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-20T18:09:55Z","updated_at":"2016-02-28T17:11:32Z","closed_at":"2016-02-28T17:11:32Z","body":"\r\nAn async script executes before the whole page is available (in chrome), but defer waits until the page has loaded. In cases where you want to make sure that all the DOM on the initial page is available from within your main function, you should use defer instead of async.\r\n\r\n```<script defer src=\"index.dart\" type=\"application/dart\"></script>```\r\n```<script defer src=\"packages/browser/dart.js\"></script>```\r\n\r\nPull requests welcome."}}