function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gianina SkarlettGianina Skarlett 

Cannot access DOM element from browser extension


I currently have an extension that has similar functionality to Google's autocomplete. This extension is intended to work in the Service Console in the Email tab (where an agent replies to tickets) but currently, I'm unable to access the body of this reply box. The problem I'm facing is:

1. The Email body in the salesforce tab is an iframe inside of an iframe with the src hidden for security reasons and if I query the element in a different way salesforce doesn't allow me to access the contentWindow of the iframe either since it's giving CSP errors. (this would be needed to attach keydown event).

More context:
I do understand how the LockerService works, however, I would like some clarification if creating a Lightning component inside of my extension with a controller would help me be able to somehow target that tab and listen to this event. Thank you