MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / selectAllInFrameScript

Function selectAllInFrameScript

lib/helper/extras/richTextEditor.js:91–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89}
90
91function selectAllInFrameScript() {
92 const el = document.querySelector('[data-codeceptjs-rte-target]') || document.body
93 el.focus()
94 const range = document.createRange()
95 range.selectNodeContents(el)
96 const sel = window.getSelection()
97 sel.removeAllRanges()
98 sel.addRange(range)
99 return document.activeElement === el
100}
101
102function selectAllInEditable(el) {
103 const doc = el.ownerDocument

Callers

nothing calls this directly

Calls 1

focusMethod · 0.45

Tested by

no test coverage detected