{"action":"created","issue":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/860","repository_url":"https://api.github.com/repos/slightlyoff/ServiceWorker","labels_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/860/labels{/name}","comments_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/860/comments","events_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/860/events","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/860","id":144343093,"number":860,"title":"spec should queue tasks to expose attribute changes on ServiceWorker and ServiceWorkerRegistration","user":{"login":"wanderview","id":1256526,"avatar_url":"https://avatars.githubusercontent.com/u/1256526?v=3","gravatar_id":"","url":"https://api.github.com/users/wanderview","html_url":"https://github.com/wanderview","followers_url":"https://api.github.com/users/wanderview/followers","following_url":"https://api.github.com/users/wanderview/following{/other_user}","gists_url":"https://api.github.com/users/wanderview/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderview/subscriptions","organizations_url":"https://api.github.com/users/wanderview/orgs","repos_url":"https://api.github.com/users/wanderview/repos","events_url":"https://api.github.com/users/wanderview/events{/privacy}","received_events_url":"https://api.github.com/users/wanderview/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/labels/decided","name":"decided","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/milestones/2","html_url":"https://github.com/slightlyoff/ServiceWorker/milestones/Version%201","labels_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/milestones/2/labels","id":746092,"number":2,"title":"Version 1","description":"","creator":{"login":"tobie","id":3392,"avatar_url":"https://avatars.githubusercontent.com/u/3392?v=3","gravatar_id":"","url":"https://api.github.com/users/tobie","html_url":"https://github.com/tobie","followers_url":"https://api.github.com/users/tobie/followers","following_url":"https://api.github.com/users/tobie/following{/other_user}","gists_url":"https://api.github.com/users/tobie/gists{/gist_id}","starred_url":"https://api.github.com/users/tobie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobie/subscriptions","organizations_url":"https://api.github.com/users/tobie/orgs","repos_url":"https://api.github.com/users/tobie/repos","events_url":"https://api.github.com/users/tobie/events{/privacy}","received_events_url":"https://api.github.com/users/tobie/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":137,"state":"open","created_at":"2014-08-07T10:50:36Z","updated_at":"2016-04-21T06:22:26Z","due_on":"2016-03-30T15:00:00Z","closed_at":null},"comments":6,"created_at":"2016-03-29T18:06:16Z","updated_at":"2016-04-21T06:22:26Z","closed_at":"2016-04-21T06:22:26Z","body":"The spec has a couple DOM objects that are exposed to both main thread window and workers such that they represent the same underlying object.  ServiceWorker and ServiceWorkerRegistration are the main ones I'm aware of right now.\r\n\r\nThe attribute getters for both of these objects are written like this:\r\n\r\n```\r\ninstalling attribute must return the result of running these steps or their equivalent:\r\n    1) Let installingWorker be the ServiceWorker object that represents the service worker\r\n        registration’s installing worker.\r\n    2) Return installingWorker. \r\n```\r\n\r\nEssentially as a synchronous getter on the underlying shared data.  There is no explicit concurrency protection here.\r\n\r\nThe most likely way for implementations to actual write the code, however, is to queue tasks to update the attributes on the exposed DOM objects.  We should update the spec to be explicit about this.\r\n\r\nThis is important because whether we queue a task or not can have observable effects based on when statechange and updatefound events fire.  Those events are executed through queued tasks.  Using queued tasks for the attribute changes would ensure a consistent view of shared data by content script.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/comments/212764474","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/860#issuecomment-212764474","issue_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/860","id":212764474,"user":{"login":"jungkees","id":1331169,"avatar_url":"https://avatars.githubusercontent.com/u/1331169?v=3","gravatar_id":"","url":"https://api.github.com/users/jungkees","html_url":"https://github.com/jungkees","followers_url":"https://api.github.com/users/jungkees/followers","following_url":"https://api.github.com/users/jungkees/following{/other_user}","gists_url":"https://api.github.com/users/jungkees/gists{/gist_id}","starred_url":"https://api.github.com/users/jungkees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jungkees/subscriptions","organizations_url":"https://api.github.com/users/jungkees/orgs","repos_url":"https://api.github.com/users/jungkees/repos","events_url":"https://api.github.com/users/jungkees/events{/privacy}","received_events_url":"https://api.github.com/users/jungkees/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T06:22:26Z","updated_at":"2016-04-21T06:22:26Z","body":"Addressed: 3266af01ca3ab891d330a86ba3182bc5dae6c9b2"}}