Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Ted Ts'o is a rape apologist

Name: Matthew Garrett 2012-10-29 21:32

Name: Anonymous 2012-10-30 20:40

>>27
OK how about this:

<html>
  <head>
<script>
window.onload = function() {
  var body = document.getElementsByTagName('body')[0];
  var sexpr = body.getAttribute('data-sexpr');
  body.appendChild(parse_sexpr(sexpr));
};

function parse_sexpr(sexpr) {
  /* Implementation is left as an exercise to the reader. */
}
</script>
  </head>
  <body data-sexpr="
    (p
      (span
        (/attr style "color: red; font-weight: bold;")
        "hax my anus" ))
  "></body>
</html>


The end result would obviously be a DOM tree like this:

<html>
<body>
  <p>
    <span style="color: red; font-weight: bold;">hax my anus</span>
  </p>
</body>
</html>

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List