Skip to content

GmailJS method add_toolbar_button is not working #788

@shashikiran-im

Description

@shashikiran-im

Hi GmailJS Team,

FYI that I had updated code to refer jQuery & added below code & it is working,
const trustedHTMLpolicy = trustedTypes.createPolicy("default", {
createHTML: (to_escape) => to_escape,
});

$.extend({
htmlPrefilter: trustedHTMLpolicy.createHTML // this is the actual function which jQuery needs
});

But gmail.tools.add_toolbar_button() method used to add buttons to toolbar is not working & showing below error in console,

jquery.module.min.js:2 Uncaught TypeError: Illegal invocation
at T.fn.init. (jquery.module.min.js:2:44823)
at Y (jquery.module.min.js:2:6326)
at T.fn.init.html (jquery.module.min.js:2:44634)
at create_generic_toolbar_button (gmail.js:3673:16)
at Gmail.api.tools.add_toolbar_button (gmail.js:3690:16)
at extension.js:25:19
at gmail.js:2745:28

Please let me know how to address it.

Thanks in Advance,
Shashikiran

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy