Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<svg height="50" width="50">
  <circle id="cirque" data-foo="bar" cx="25" cy="25" r="20" fill="lime" />
</svg>
<div id="div"></div>
</body>
</html>
 
window.onload = function () {
  console.log("#div's dataset = " + document.getElementById('div').dataset);
  console.log("#cirque's dataset = " + document.getElementById('cirque').dataset);
};
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers