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>
    <rect fill="lightSkyBlue" width="100%" height="100%">
      <title><em>Big Blue Box!</em></title>
      <desc><p>Sample paragraph within a description</p></desc>
    </rect>
    <foreignObject width="100%" height="100%" style="color: indigo">
      <h1>HTML heading text in an SVG fragment!</h1>
      <p>Isn't it <em>awesome</em>!</p>
    </foreignObject>
    <iframe style="display:block;" width="200" ></iframe>
    <canvas></canvas>
    <video></video>
    <audio></audio>
  </svg>
</body>
</html>
 
var svg = document.querySelector("svg");
var elements = svg.querySelectorAll("*");
for (var i=0, n=elements.length; i<n; i++){
  var el = elements[i];
  console.log(el.localName, el.namespaceURI);
}
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers