-
Notifications
You must be signed in to change notification settings - Fork 458
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
Error in the function: gmail.tools.add_compose_button #783
Comments
What you are passing in to "add_compose_button" is not trusted html. This is why it fails. Convert your string to trusted html first and it should work. |
Sorry, I'm very lost... |
For now automagically handling this is not part of Gmail.js. You're probably best off reading the full docs on Trusted Types to understand how all the pieces fits together. https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API |
Shouldn't the htmlPrefilter function take care of this? I think this is the same issue I have in #784 |
I fixed the error, just delete this line: from the html function in the gmailJsLoader.js file:
|
Thats only for the parts using jquery. We're trying to rely on that as little as possible. We haven't updated -any- of gmailjs to automatically do Trusted HTML. You need to do yourself that before inserting html into Gmail.js APIs. A future version might make this smoother, but not the version we have right now. |
@guzman-rc : thx for this tip.. do you make this change post I am doing this manually, but wondering if there's a better way until long term fix comes out. |
I get this console error when I call
gmail.tools.add_compose_button
This is my extension.js file
The text was updated successfully, but these errors were encountered: