jakiestfu / jakiestfu/Snap.js

IE8: window.getComputedStyle is undefined

Open
#97 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
642
PR merge metrics
No merged PRs in 30d

Description

In IE8 on Win XP, I get an error on the page.

![screen shot 2013-07-22 at 11 21 57 am](https://f.cloud.github.com/assets/552044/836565/4599e458-f2f3-11e2-8a4b-e2ee8ccfd9e3.png)

Traced to this line:

```
win.getComputedStyle(settings.element)[cache.vendor+'Transform'].match(/\((.*)\)/)
```

Apparently the `utils.canTransform` feature detection passes, but the `win.getComputedStyle` function is unavailable.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the reported win.getComputedStyle(settings.element)[cache.vendor+'Transform'] line and inspect the utils.canTransform feature detection it relies on. Reproduce the IE8 failure if possible and trace how the detection allows this path. Done means the reported error is addressed for IE8 without breaking the transform path in supported browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.