0

I am doing 3rd party integration with yodlee ,and getting the below error Invalid container element .Here is the html code :

<div data-id="container-fastlink" class="container-fastlink">
        <div style="text-align: center;">
            
            <lightning-button class="slds-button slds-button_brand CenterButton" onclick={fastlinkAccount} label="Connect Account" id="btn-fastlink">  </lightning-button>

        </div>

And JS:

 const dynamicContainerId = this.template.querySelector('.container-fastlink').dataset.id;

        console.log('dynamicContainerId is -> ',dynamicContainerId);
        console.log('this.accessToken== ' + this.accessToken);
        var userToken = this.accessToken;
        console.log('usr== ' + userToken);
        console.log('this.fastLinkUrl== ' + this.fastLinkUrl);

        try {

            window.fastlink.open({
                fastLinkURL: this.fastLinkUrl, 
                accessToken: 'Bearer ' + userToken, 
                params: {
                    userExperienceFlow: 'Aggregation',
                    configName: 'Aggregation',
                    forceIframe : true,
                    forceRedirect: true,
                    iframeResize: true
                }, },dynamicContainerId);

Please help me where i am getting wrong?

1 Answer 1

0

Because of Locker Security/Lightning Web Security, you must specify the component as having lwc:dom="manual", as in:

<div data-id="container-fastlink" class="container-fastlink" lwc:dom="manual"></div>

Even then, you might run into security restrictions.

Your best choice would be to do this in Visualforce, which you can then put into an iframe wherever you'd like

1
  • I already tried using lwc:dom="manual" but did not work,looks like only option I have is to try with VF pages. Commented Jan 17, 2024 at 4:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.