package quill
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a9a8a9787f8250337187bb7b21cb317c41bfd2ecf08bcfe0ab407c7b6660764d
sha512=fe13cf257c487e41efe2967be147d80fa94bac8996d3aab2b8fd16f0bbbd108c15e0e58c025ec9bf294d4a0d220ca2ba00c3b1b42fa2143f758c5f0ee4c15782
doc/quill.editor/Quill_editor/Brr_ext/Document/index.html
Module Brr_ext.DocumentSource
include module type of struct include Brr.Document end
type t = Brr.El.documentThe type for Document objects. See G.document for the global object.
val as_target : t -> Brr.Ev.targetas_target d is the document as an event target.
Element lookups
find_el_by_id d id is the element of the document with id attribute equal to id (if any).
find_els_by_name d n is the list of elements of the document with name attribute equal to n.
root d is the document's root element.
body d is the document's body element.
Warning. Technically this could be null if your script loads too early. It's a bit inconvenient to have it as an option though so we raise a JavaScript error if that happens; see here on the way to load your script so that it does not.
head d is the document's head element.
active_el d is the document's active element, that is the one that has the focus (if any).
Properties
title d is the document title.
set_title d t sets the document title.
module Visibility_state = Brr.Document.Visibility_stateVisibility state enumeration.
val visibility_state : t -> Visibility_state.tvisibility_state d is the visibility state of d. Use the Ev.visibilitychange event to watch for changes.
Pointer locking
pointer_lock_element d is the element that currently locks the pointer (if any).
exit_pointer_lock d exits pointer lock mode. The future determines when the corresponding Ev.pointerlockchange on d has fired.
Fullscreen
Use El.request_fullscreen to get into fullscreen mode.
val fullscreen_available : t -> boolfullscreen_available d is true if fullscreen functionality is supported and can be used.
fullscreen_element d is the element that is being currently presented in fullscreen mode (if any).
val exit_fullscreen : t -> unit Fut.or_errorexit_fullscreen d exits fullscreen mode.