Unified · Split
| @@ -147,13 +147,20 @@ · 146 unmodified lines | |||
| 147 | 147 | ||
| 148 | isSupportedBrowser: -> | 148 | isSupportedBrowser: -> |
| 149 | try | 149 | try |
| 150 | return true if Function::bind and | 150 | features = |
| 151 | history.pushState and | 151 | bind: !!Function::bind |
| 152 | window.matchMedia and | 152 | pushState: !!history.pushState |
| 153 | document.body.classList and | 153 | matchMedia: !!window.matchMedia |
| 154 | document.body.insertAdjacentHTML and | 154 | classList: !!document.body.classList |
| 155 | document.createEvent('CustomEvent').defaultPrevented is false and | 155 | insertAdjacentHTML: !!document.body.insertAdjacentHTML |
| 156 | getComputedStyle(document.querySelector('._header')).backgroundImage isnt 'none' | 156 | defaultPrevented: document.createEvent('CustomEvent').defaultPrevented is false |
| 157 | cssGradients: getComputedStyle(document.querySelector('._header')).backgroundImage isnt 'none' | ||
| 158 | |||
| 159 | for key, value of features when not value | ||
| 160 | Raven.captureMessage 'unsupported', extra: { feature: key } | ||
| 161 | return false | ||
| 162 | |||
| 163 | true | ||
| 157 | catch error | 164 | catch error |
| 158 | Raven.captureMessage 'unsupported exception', extra: { error: error, name: error.name, message: error.message } | 165 | Raven.captureMessage 'unsupported exception', extra: { error: error, name: error.name, message: error.message } |
| 159 | false | 166 | false |