title: How to get the binary representation of the content of a DOM element in javascript?
body: <p>Getting the string representation is quite straightforward, but I cannot find how to get the binary content (ultimately into a typed array). For example if a div has CDATA content that is binary data, rather than base64 encoded. Other similar examples exist as well, in which the contents of the div are not necessarily entirely in string format. The approach is intended to work when the document source url is file:// as well as http://, so I cannot necessarily reread the content via an XmlHttpRequest.</p>