[Skratchdot.]

Archive for the ‘Javascript’ Category:

domFormat is a simple javascript library to get DOM nodes as formatted/pretty strings.

You can find the source code here:

https://github.com/skratchdot/domFormat

And some examples here:

http://skratchdot.github.com/domFormat/examples/index-html5.html

Here are 2 bookmarklets:

– Show Source –

– Reload Page With Formatted Source –

Tagged with:

This weekend I read an interesting blog post called “JSON: The JavaScript subset that isn’t” and decided to test ColdFusion’s SerializeJSON() function to see if the “bug” existed there. It does. To reproduce, you can create a .cfm page that contains the following HTML/CF code:

1
2
3
<script type="text/javascript">
    var test = #SerializeJSON("test" & chr(8232))#;
</script>

To “fix” the bug, you can replace SerializeJSON() with SafeSerializeJSON() like this:

Tagged with:

BOOKS:

 
Javascript: The Good Parts
Javascript: The Definitive Guide
 
 

TOOLS/BLOGS:

 
jQuery: The Write Less, Do More, Javascript Library
JSLint: The JavaScript Code Quality Tool
Mozilla: Javascript Guide
Mozilla: A Re-Introduction To Javascript
Ajaxian
QuirksMode
 
Tagged with: