[Bug 23460] Make innerHTML/outerHTML getter non-throwing?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23460

--- Comment #4 from Arkadiusz Michalski (Spirit) <crimsteam@gmail.com> ---
Yesterday I think something simillar - adding second argument to
serializeToString(), optional nature should not breake actual content and
provied fast way for checking node tree as required by XML. Something what we
have for DOMParser.parseFromString() where we can decide what parser rules are
used.

Travis, if you take attention around serializeToString(), what about directly
passing Attr object? Intention is Attr not inherit from Node, but in future it
is possible in all scenerio? Look this small test:

<script>

        var serializer = new XMLSerializer();
        var newAttr = document.createAttribute("id");
        newAttr.value = "test";

        try{
                var returnValue = serializer.serializeToString(newAttr);
                document.write("Error not throw:" + "<br>");
                document.write(typeof returnValue + "<br>");
                document.write(returnValue + "<br>");
                document.write(returnValue.length + "<br>");
        }
        catch(e){
                document.write("<br><br>" + "Invalid input data for
serializeToString():" + "<br>");
                document.write(e);
        }

</script>

All browsers accept Attr object as argument for serializeToString() and not
throw, but Firefox and Chrome return empty string, whene IE11 return attr's
value. If this behaviour will not change then one of them should be standarized
in P&S specyfication. Some telemetry could be useful here, maybe throwing is
still possible.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.

Received on Wednesday, 30 September 2015 20:55:52 UTC