- From: Jake Archibald <notifications@github.com>
- Date: Mon, 13 Apr 2015 03:48:33 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Monday, 13 April 2015 10:49:00 UTC
Yeah, that's what I was thinking, it would be a shortcut like `response.ok`.
@slightlyoff is that what you're thinking? As in:
```js
Object.defineProperty(Request.prototype, 'canCreateClient', {
get() {
var clientCreatingContexts = [
'embed', 'form', 'frame',
'hyperlink', 'iframe', 'internal',
'location', 'metarefresh', 'object',
'serviceworker', 'sharedworker',
'worker'
];
return clientCreatingContexts.indexOf(this.context) != -1;
}
});
```
---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/673#issuecomment-92305399
Received on Monday, 13 April 2015 10:49:00 UTC