AngleSharp Scripting v0.5.0 released
The biggest internal change is the placement of the correct prototype chain. This was on the list for quite some time. The change allows calling, e.g.,
Object.getPrototypeOf(document) with the result being the
HTMLDocument.prototype element. Also objects such as
HTMLDocument are now available on the
window context. These objects are the constructor functions of their matching DOM interfaces. In most cases the constructors are just dummies, which cannot be used directly.
A quite nice addition is the first API extension from the library. The
document.ExecuteScript("2+3") would result in a boxed
System.Double instance (
5). Similarly, a call to
document.ExecuteScript("document.querySelector('div')") would return the instance of the first
div element in the document.
Finally, a couple of improvements to the type casting abilities have been integrated. Functions are now also accepted in form of strings (e.g., for