Comments (3)
This is certainly a really useful list. Thanks a lot for writing it all down!
The AngleSharp.Scripting project is currently just a proof of concept, however, I will definitely continue to improve it. This will fix some of your problems, others will have to be solved in the core library. It is definitely on my list, since one of the goals I have for 0.9 (not the next, i.e. 0.8, release) is to run html5test.com, which requires a lot of JavaScript. Then eventually jQuery should also run out of the box. This will be an interesting moment.
Now to all your bullets (some of my thoughts):
- You are totally correct. There must be a way of injecting missing interfaces. I already thought about this, because I realized that I can't provide all interface (implementations) and also I probably should not provide all. The
IService
interface is a hint where I am going with this, but more structure and more thinking is needed to come up with something really useful. The navigator object is also required for the html5test.com. - I think the official interface does not allow that, but it may be one of the APIs where AngleSharp could be more useful than browsers / APIs. I could decorate the JavaScript / DOM API to be getter-only and provide an additional setter for .NET.
- Yes, the "new" way of doing things is with an event constructor. Until now AngleSharp implemented the old way, which was using a factory method on the document (
createEvent
) in combination with a specialinitEvent
(this name is different for specialized events, but it is always init*, where * is the name of the interface) method. AngleSharp will also open up the constructor in v0.8. - Do you think this is generally the better way? I mean I coded the whole AngleSharp.Scripting library in a couple of hours and it is far away from being perfect. It was just meant as a starting point / proof of concept. I would happily see someone trying to improve it / fix such bugs. What you did seems like a good addition and should definitely be merged into the project.
- I guess 4.) also applies here. Extensible should definitely be set and the rest as well.
- Yeah you are right. Here the value should be transformed via some
toString
(maybe not the .NETToString()
, but rather a Jint wrapper, or something that behaves similarly) as a JS engine would do it. - Hm the readystatechange event should be raised automatically at the end of the document loading. Either the document has already finished loading or something weird happened. I'll have a look!
Again thanks for letting me know. If you have any useful additions to the Scripting project (as the ones noted above), then I would be more than happy to accept pull requests.
from anglesharp.
Thank you for your response.
Regarding the "fixes" for the Scripting library, please feel free to include them when you think it's better timing. Since it's a proof of concept project, I don't think there is any point in pulling in a request.
Also, no, I don't think my fixes are the "better way". It's just enough to have a working context on a window object!
As for the readystangechange, don't bother searching for a bug: I evaluated the javascript manually, after the dom was parsed, and that's why I wanted to raise the event myself.
Keep up the good work. I'll be definitely looking forward to 0.9 ;-)
from anglesharp.
I am closing this issue. It has been completely moved to the AngleSharp.Scripting repository. There the issue has been decomposed into smaller items. These items will be handled step by step.
from anglesharp.
Related Issues (20)
- Request for Support / Sponsorship HOT 1
- IHtmlDocument has IDisposable - for what?) HOT 1
- Redirect to Custom URL Scheme HOT 2
- Issues with Headers HOT 2
- Use libraries provided by framework HOT 3
- Provide repo link as part of nuget package HOT 8
- QuerySelectorAll problem HOT 1
- SemVer scheme in AngleSharp -alpha versions broken HOT 1
- Multipart/form-data support HOT 1
- IndexOutOfRangeException in AngleSharp.Common.ArrayPoolBuffer.Append HOT 1
- Getting Attributes for each Element HOT 1
- InvalidOperationException: Stack empty in AngleSharp.Html.Parser.HtmlDomBuilder HOT 1
- Attributes in Elements HOT 3
- Parser Issue Findings from Fuzzing HOT 4
- Additional Findings from Fuzzing HOT 3
- NullReferenceException when using own HttpClient HOT 1
- How to Change the Accept header in DocumentRequest HOT 1
- Link element source not loaded when element is appended to document
- AngleSharp 1.2.0-beta.410 can not be loaded in .Net Framework because of System.Memory version error HOT 3
- obsolete reference HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anglesharp.