Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

buildNode creates "-1" on some non-string values in IE #25

Description

@dandormont

buildNode() accepts a map of keys and values. If one of these values is the Boolean value true, it becomes "-1" rather than the string "true" in the final packet, but only in Internet Explorer - specifically IE 8. Here's a small code sample:

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="lib/jsjac-1.3.4/jsjac.uncompressed.js"></script>
    </head>
    <body>
        <div id="content">TODO write content</div>
        <script type="text/javascript">
            var msg = new JSJaCMessage();
            msg.setBody('foo');
            msg.appendNode(msg.buildNode('bar', { isBar: true, 'baz': 'quux' }));            
            document.getElementById('content').innerText = msg.xml();
            alert(msg.xml());
        </script>                
    </body>
</html>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions