You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create NodeIterator object using the following code
var config = Configuration.Default.WithJs();
var context = BrowsingContext.New(config);
var document = await context.OpenAsync(req => req.Content("")).ConfigureAwait(false);
document.ExecuteScript("document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, null)");
Running it causes the exception Jint.Runtime.JavaScriptException: 'NodeFilter is not defined' I see that FilterSettings enum has [DomName("NodeFilter")] attribute, and yet it is not visible in JS.
I tried to check where other DomName attributes are resolved and that led me to the CreatorCache, where enums and classes are treated in a different way, which might explain the problem. But being totally new to AngleSharp and AngleSharp.JS, maybe I miss something, e.g. some configuration switch, which forces NodeFilter to be registered in JS?
I'm trying to create NodeIterator object using the following code
Running it causes the exception
Jint.Runtime.JavaScriptException: 'NodeFilter is not defined'
I see thatFilterSettings
enum has[DomName("NodeFilter")]
attribute, and yet it is not visible in JS.I tried to check where other
DomName
attributes are resolved and that led me to theCreatorCache
, where enums and classes are treated in a different way, which might explain the problem. But being totally new to AngleSharp and AngleSharp.JS, maybe I miss something, e.g. some configuration switch, which forces NodeFilter to be registered in JS?Versions:
AngleSharp & AngleSharp.JS: master
Jint: 4.2.1
The text was updated successfully, but these errors were encountered: