Created
October 16, 2012 22:27
-
-
Save jquerygeek/3902461 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init: function() { | |
var html = "<!doctype html><html lang='en'>" + $('html').html() + "</html>"; | |
var validatorURL = "http://html5.validator.nu/?out=json"; | |
$.post({url: validatorURL, headers: {"Content-type": "text/html"}, body: html}, | |
function(err, res, body) { | |
alert('response: '+res); | |
if (err) alert(err); | |
var data = JSON.parse(body); | |
console.log(data); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment