mirror of
https://github.com/checkly/headless-recorder.git
synced 2021-07-28 02:03:42 +03:00
chore: remove references to the unused list of elements-to-bind-to
This commit is contained in:
@@ -17,7 +17,7 @@ This project is pretty fresh, but does the following already:
|
||||
- Offers configuration options.
|
||||
- Allows data-id configuration for element selection.
|
||||
|
||||
> Note: we only record clicks etc. on a handful of elements, see the `elements-to-bind-to.js` and `dom-events-to-record.js` files in the code-generator folder for which events. This collection will be expanded in future releases.
|
||||
> Note: we only record certain events. See `dom-events-to-record.js` in the code-generator folder for which events. This collection will be expanded in future releases.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
export default [
|
||||
'input',
|
||||
'textarea',
|
||||
'a',
|
||||
'button',
|
||||
'select',
|
||||
'option',
|
||||
'label',
|
||||
'h1',
|
||||
'h2',
|
||||
'h3',
|
||||
'h4',
|
||||
'h5',
|
||||
'h6',
|
||||
'div',
|
||||
'span',
|
||||
'img'
|
||||
]
|
||||
@@ -8,7 +8,6 @@ let browser
|
||||
let page
|
||||
|
||||
describe.skip('forms', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await runDist()
|
||||
const buildDir = process.env.NODE_ENV === 'production' ? '../../../dist' : '../../../build'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import eventsToRecord from '../code-generator/dom-events-to-record'
|
||||
import elementsToBindTo from '../code-generator/elements-to-bind-to'
|
||||
import finder from '@medv/finder'
|
||||
|
||||
class EventRecorder {
|
||||
@@ -17,7 +16,7 @@ class EventRecorder {
|
||||
|
||||
const events = Object.values(eventsToRecord)
|
||||
if (!window.pptRecorderAddedControlListeners) {
|
||||
this.addAllListeners(elementsToBindTo, events)
|
||||
this.addAllListeners(events)
|
||||
window.pptRecorderAddedControlListeners = true
|
||||
}
|
||||
|
||||
@@ -35,7 +34,7 @@ class EventRecorder {
|
||||
})
|
||||
}
|
||||
|
||||
addAllListeners (elements, events) {
|
||||
addAllListeners (events) {
|
||||
const boundedRecordEvent = this.recordEvent.bind(this)
|
||||
events.forEach(type => {
|
||||
window.addEventListener(type, boundedRecordEvent, true)
|
||||
|
||||
Reference in New Issue
Block a user