Raynos/DOM-shim — Issue #41: Fix bug in Opera 12 with <element>.dataset and Object.keys()
Author: termi1uc1
Created: 2012-01-28 17:32:46+00:00
State: open

## CORE-44107: updating of `.dataset` is frozen if apply `Object.keys` to it before any `.setAttribute`.

### Bug detection [Draft]:

var a = document.createElement('a');
Object.keys(a.dataset);
a.setAttribute("data-a", "");
if(Object.keys(a.dataset).length == 0)console.log("BUG")

#### Note:

1. `for(var name in a.dataset){}` instead of `Object.keys(a.dataset)` do the same behavior

### How we can't fix this bug:

1. Can't replace `Object.keys` due Note#1
2. Can't fix `document.createElement` due it's not fixed existing elements