mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Selection interface working for synthetic operations
This commit is contained in:
parent
e697e6cca7
commit
5ef3358951
30 changed files with 812 additions and 8468 deletions
|
@ -47,6 +47,7 @@ use crate::dom::node::{document_from_node, from_untrusted_node_address, Node, No
|
|||
use crate::dom::performance::Performance;
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::dom::screen::Screen;
|
||||
use crate::dom::selection::Selection;
|
||||
use crate::dom::storage::Storage;
|
||||
use crate::dom::testrunner::TestRunner;
|
||||
use crate::dom::webglrenderingcontext::WebGLCommandSender;
|
||||
|
@ -1322,6 +1323,11 @@ impl WindowMethods for Window {
|
|||
fn Origin(&self) -> USVString {
|
||||
USVString(self.origin().immutable().ascii_serialization())
|
||||
}
|
||||
|
||||
// https://w3c.github.io/selection-api/#dom-window-getselection
|
||||
fn GetSelection(&self) -> Option<DomRoot<Selection>> {
|
||||
self.document.get().and_then(|d| d.GetSelection())
|
||||
}
|
||||
}
|
||||
|
||||
impl Window {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue