mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
moebius#121: DOM - Selection API - getSelection() should exist on XMLDocument / Selection.type
https://github.com/MoonchildProductions/moebius/pull/121
This commit is contained in:
parent
f0c237ae6d
commit
9db39c42c0
10 changed files with 43 additions and 32 deletions
|
|
@ -5349,6 +5349,18 @@ Selection::GetRangeCount(int32_t* aRangeCount)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
Selection::GetType(nsAString& aOutType) const
|
||||
{
|
||||
if (!RangeCount()) {
|
||||
aOutType.AssignLiteral("None");
|
||||
} else if (IsCollapsed()) {
|
||||
aOutType.AssignLiteral("Caret");
|
||||
} else {
|
||||
aOutType.AssignLiteral("Range");
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Selection::GetRangeAt(int32_t aIndex, nsIDOMRange** aReturn)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue