Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This document requires 'TrustedHTML' assignment #38

Open
kstubs opened this issue Jul 16, 2024 · 16 comments
Open

This document requires 'TrustedHTML' assignment #38

kstubs opened this issue Jul 16, 2024 · 16 comments

Comments

@kstubs
Copy link

kstubs commented Jul 16, 2024

I'm following the ReadMe installation instructions for installing the boilerplate. I've ran the npm install and build steps and have loaded the extension into chrome. I've attached my console log.
mail.google.com-1721145048368.log

In this log, I see errors related to TrustedHTML and see errors related to jQuery is not defined. There are more errors, but these might be a cascading result stemming from the above. I'm not sure.

Is the boilerplate outfitted with the jQuery updates that fix this TrustedHTML issue?

Karl..

@josteink
Copy link
Owner

Good catch! That TrustedHTML patch was never added to the boilerplate repo.

It would probably be very useful and instructive if added!

Do you think you could be able to create a PR for that?

I'm kinda busy with family vacation atm and while I can quickly approve a PR, implementing it myself might take a bit more time 😇

@kstubs
Copy link
Author

kstubs commented Jul 16, 2024 via email

@kstubs
Copy link
Author

kstubs commented Aug 13, 2024

Can you point me to the particular pull request from the gmailjs repo where the TrustedHTML updates were implemented? This would help get me started in updating the boilerplate to remedy the issues with it.

@kstubs
Copy link
Author

kstubs commented Aug 13, 2024

It looks like the boilerplate is attempting to solved the trusted html policy issue, but I guess not working correctly?

const trustedHTMLpolicy = trustedTypes.createPolicy("default", {

@kstubs
Copy link
Author

kstubs commented Aug 13, 2024

I see where you fixed the boiler plate: KartikTalwar/gmail.js#779 (comment)
I'm playing catch-up here! So I'm not sure what we are trying to fix, since you fixed and tested it and it was working ;/

UPDATE!
The boilerplate is working for me now.

@josteink
Copy link
Owner

Oh my bad then.

Well, the good news is you got things working, I guess?

@kstubs
Copy link
Author

kstubs commented Aug 14, 2024 via email

@josteink
Copy link
Owner

If your extension was published anywhere, it should be easy to just redownload the ZIP/XPI and extract the old code, right? ;)

@kstubs
Copy link
Author

kstubs commented Aug 14, 2024 via email

@krylor
Copy link

krylor commented Nov 21, 2024

Hey Karl,

Do you have that custom extension, I want to integrate this with my screens and all.

@kstubs
Copy link
Author

kstubs commented Nov 21, 2024 via email

@krylor
Copy link

krylor commented Nov 22, 2024

Oh, I was looking for a good example where I could inject my custom pop-up as a button.
The idea is to integrate this with my own CRM and respond to events, I had built one based on the earlier boiler-plate example but that's now obsolete and has stopped working altogether.

@josteink
Copy link
Owner

I had built one based on the earlier boiler-plate example but that's now obsolete and has stopped working altogether.

To be clear... the boilerplate works fine for me. When you say "stopped working", are you talking about the boiler-plate or the project you yourself built?

@krylor
Copy link

krylor commented Nov 22, 2024

The project that I built based on the older boiler plate broke because Gmail changed a bunch of stuff.
I guess the old boilerplate is broken too. yours works fine though.

@krylor
Copy link

krylor commented Nov 23, 2024

Can I inject jquery, my legacy requires it.
I need it for the other parts of my extension.
When I try to do it, it gives me that "TrustedHTML" error.

@josteink
Copy link
Owner

I'm including jquery, but bundling it.

Once loaded, it should be easy to inject into the global DOM if you need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants