Comments (3)
No, you need to have some dependency on it. True style computation has to consider the currently applied media rules and the page dimensions. All such values are given / will be given on IWindow. Don't confuse IWindow with a real window / tab. It is not. It is only a concept to hold additional information beyond a pure IDocument. Every IDocument will have its own IWindow associated, with some IWindowProxy being responsible for forwarding the IWindow of the active IDocument in a browsing context (headless browsing).
from anglesharp.
Ok Almost. What about members of IWindow like Alert, Confirm, Close, Stop, Focus - these seem very UI centric. So what would a headless implementation of IWindow ?
from anglesharp.
These UI methods (same for Click
, and others) have to be forwarded / implemented by the user. Usually they would do nothing. If an implementation exists (I haven't thought about a good name, let's call that interface IPresentationService
), i.e. if GetService<IPresentationService>()
delivers an implementation, the method on the service will be called.
The AnalysisWindow
tries to be a draft of a headless window, however, I will probably remove the implementation from AngleSharp. Reason is simple: I want to deliver another library called AngleSharp.Browser
, which will contain such implementations. This library will contain (among others):
- Implementation of
IBrowsingContext
- Implementation of
IEventService
- Implementation of
IWindow
- ... (also currently not drafted ones like
IPresentable
)
Nevertheless, it follows the same spirit, i.e. even though a default configuration will be made available, everything can be removed / added. So if one wants to use the implementations in AngleSharp.Browser, however, for a real browser / rendering control (not a headless one), then this will be possible.
I am not sure if I should also release AngleSharp.Scripting. Right now this is just a proof of concept and even though rudimentary JavaScript works, it is (performance and technology-wise) far from being ideal. One might argue that having a basic JS engine is better than none, nevertheless, that could be easily archived even without depending on AngleSharp.Scripting directly. So I don't know.
from anglesharp.
Related Issues (20)
- 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
- Digitally Sign AngleSharp NuGet Package Assemblies HOT 1
- DomGeometry Support HOT 3
- Document Behavior of IsVisible and Other Placeholder Methods HOT 7
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.