Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in Opera 12 with <element>.dataset and Object.keys() #41

Open
termi opened this issue Jan 28, 2012 · 2 comments
Open

Fix bug in Opera 12 with <element>.dataset and Object.keys() #41

termi opened this issue Jan 28, 2012 · 2 comments
Labels

Comments

@termi
Copy link
Collaborator

termi commented Jan 28, 2012

CORE-44107: updating of <element>.dataset is frozen if apply Object.keys to it before any <element>.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")

Opera versions:

At least in Opera 11.61 and Opera 12.1256 Alpha

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
@Raynos
Copy link
Owner

Raynos commented Jan 28, 2012

Does the same happen if we just touch a.dataset ? Like var a = document.createElement("a"), b = a.dataset; ?

Have you raised a ticket with the opera guys?

@termi
Copy link
Collaborator Author

termi commented Jan 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants