Here is the code that I wrote in utils.js WebConsoleCommands. I am not sure how can I instantiate a new EventCollector instance since it needs 'targetActor' as an argument. addEventListener() works by adding a function or an object that implements EventListener to the list of event listeners for. Common targets are Element, Document, and Window, but the target may be any object that supports events (such as XMLHttpRequest). This is good as a first trial for me to understand how the thing works. The EventTarget method addEventListener() sets up a function that will be called whenever the specified event is delivered to the target. The result after I mach build is that when I use getEventListeners in the console, it acts as inspectObject. EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. Please note that the return value is immutable. Get a listener definition matching the specified eventTarget and eventType (optional). I registered "getEventListeners" in the devtools\server\actors\webconsole\utils.js file and in the handleHelperResult function in devtools\client\webconsole\actions\input.js file, but currently I am using the same functionality of 'inspectObject'. eventListenerHelper.getEventListeners (eventTarget, eventType). Then, I would like to compare dom nodes from these instances with each other. One of these instances would have strict content blocking while the other would not. Ideally, it would run 2 firefox instances (maybe headless). I am trying to build a tool that can predict page breakages due to content blocking.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |