I've made a short sample to show the problem I had :

__________________________________________________________________
<html>
<head>
    <script>
        function test() {
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
            var xoDomSerializer = new XMLSerializer();
            var oNode = document.getElementById('myNode');
            alert(xoDomSerializer.serializeToString(oNode));
        }
    </script>
</head>
<body>
    <input type="button" value="Test" onclick="test();">
    <div id="myNode">Il �tait une fois <i>une petite fille <b>de
village</b></i>.</div>
</body>
</html>
__________________________________________________________________


It works fine under windows (after clicking on the test button, it
shows a popup and the node content within) but I obtain the following
error under Mac :

Error: uncaught exception: [Exception... "Component returned failure
code: 0xbfffda58 [nsIDOMSerializer.serializeToString]"  nsresult:
"0xbfffda58 (<unknown>)"  location: "JS frame ::
file:///Macintosh%20HD%20G4/Users/mikael/Desktop/test.html :: test ::
line 11"  data: no]

I really don't understand where the problem come from !
Pleaase help me !
Mikael

Reply via email to