NAME

HTML::Tested::JavaScript::Serializer - Serialize HTML::Tested to/from JavaScript.

SYNOPSIS

package MyClass;
use base 'HTML::Tested';
use HTML::Tested::JavaScript::Serializer;
use HTML::Tested::JavaScript::Serializer::Value;

use constant HTJS => "HTML::Tested::JavaScript::Serializer";

# add JS Value named "val".
__PACKAGE__->ht_add_widget(HTJS . "::Value", "val");

# add serializer "ser" and bind "val" to it.
__PACKAGE__->ht_add_widget(HTJS, "ser", "val");

# now MyClass->ht_render produces ser javascript variable

# in your HTML file serialize back
ht_serializer_submit(ser, url, callback);

DESCRIPTION

This module serializes data to/from JavaScript data structures. It also produces script tags to include necessary JavaScript files.

AUTHOR

Boris Sukholitko
boriss@gmail.com

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module. =head1 SEE ALSO

HTML::Tested, HTML::Tested::JavaScript::Serializer::Value, HTML::Tested::JavaScript::Serializer::List.

Tests for HTML::Tested::JavaScript.