Age | Commit message (Collapse) | Author |
|
|
|
Returning it by reference can lead to unpleasant situations if we use
this getter when the document may go away. Better to make the getter
return a copy than have to think about this everywhere.
|
|
This makes stuff inside <noscript> correctly not show up since we run
with scripting enabled.
In the future, we can add a way to disable scripting, but for now,
Document::is_scripting_enabled() just returns true.
|
|
Until now we would simply apply stylesheets in the order they finished
loading. This patch adds a StyleSheetList object that hangs off of each
Document and contains all the style sheets in document order.
There's still a lot of work to do for a proper cascade, but at least
this makes us consistently wrong every time. :^)
|
|
This patch adds two script lists to Document:
- Scripts to execute when parsing has finished
- Scripts to execute as soon as possible
Since we don't actually load scripts asynchronously yet (we just do a
synchronous load when parsing the <script> element for simplicity),
these are already loaded by the time we get to "The end" of parsing.
|
|
This doesn't do anything yet, but it will sooner or later. :^)
|
|
This only works in some narrow cases, but should be enough for our own
welcome.html at least. :^)
|
|
|
|
This is still very unfinished, but there's at least a skeleton of code.
|
|
|
|
Every Document now has an Origin, found via Document::origin().
It's based on the URL of the document.
This will be used to implement things like the same-origin policy.
|
|
This patch makes it possible to execute JavaScript by clicking on an
anchor element with href="javascript:your_script_here()".
|
|
LibWeb now creates a WindowObject which inherits from GlobalObject.
Allocation of the global object is moved out of the Interpreter ctor
to allow for specialized construction.
The existing Window interfaces are moved to WindowObject with their
implementation code in the new Window class.
|
|
This currently returns a JS::Array of elements matching a selector.
The more correct behavior would be to return a static NodeList, but as
we don't have NodeLists right now, that'll be a task for the future.
|
|
This matches the current version of the DOM spec. And since C++ doesn't
have mixins this is actually a CRTP class.
|
|
This function allows you to throw away the entire layout tree if that's
something you want to do.
It's certainly not super cheap to reconstruct, but hey, who am I to
tell you what to do? :^)
|
|
This makes selector matching a lot more efficient, and also reduces the
number of strings on the heap.
|
|
This patch introduces the Wrapper and Wrappable classes.
Node now inherits from Wrappable, and can be wrapped in a GC-allocated
Bindings::NodeWrapper object. The only property we expose right now is
the very simple nodeName property.
When a Document's JS::Interpreter is first instantiated, we add a
"document" property with a DocumentWrapper object to the global object.
This is pretty cool! :^)
|
|
This patch begins integrating LibJS into LibWeb. Document holds the
JS::Interpreter for now, and it is created on demand when you first
call Document::interpreter().
We also add a simple "alert()" function to the global object.
|
|
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
|