Questions tagged [locker-service]

Locker Service is a set of new security features for Lightning Components.

Filter by
Sorted by
Tagged with
0
votes
0answers
32 views

LWC JS loadScript

I am trying to load this JS script: http://cdn.tagcommander.com/3468/tc_ENGIE_iframe.js So I downloaded it as static resource and use loadScript in LWC: import { loadScript } from "lightning/...
0
votes
1answer
577 views

Is it possible to set Custom Dimensions in Google Analytics for Salesforce Communities with Locker Service

I am trying to get data from my Salesforce Communities (napili) into Google Analytics. This Google Analytics guide says this can be done using custom dimensions. Custom dimensions and metrics allow ...
0
votes
0answers
31 views

What is lwc doing to custom ES6 Proxies?

The Problem: I am experiencing broken behavior when I pass Proxies as Event details or as public properties. Requirement: they need to wrap a {nested: {value: "Foo"}}. I experienced this ...
1
vote
1answer
81 views

Stripe with Salesforce (using LWC)

Is it possible to integrate to Stripe using a Salesforce LWC? I am having an issue trying to submit a valid test card to Stripe. Is LockerService blocking this somehow? I have the below LWC code, ...
13
votes
1answer
786 views

Highcharts not being rendered in Microsoft Edge browser | Lightning component

I'm facing an issue where Highcharts report is not being loaded when opened using Microsoft edge browser. It's loading fine when opened using Google Chrome. Here's the code:- Component:- <aura:...
6
votes
2answers
4k views

window.onload() and LockerService

When calling window.onload() and LockerService is enabled, I get this error: aura_proddebug.js:17569 Uncaught TypeError: Cannot use 'in' operator to search for 'target' in undefined at Function....
2
votes
1answer
822 views

jsPDF and Salesforce Lightning Web Component

I'm trying to create a Salesforce Lightning Web Component to create a custom Quote PDF using jsPDF. I mastered to use the external chart.js library with uploading it as a static resource, but when I ...
7
votes
4answers
14k views

event.target.value not working after enabling lockerservice

event.target.value not working after enabling lockerservice in lightning. Can you guys help me with this? Thanks
1
vote
1answer
532 views

resize lightning component in community builder - locker service

I have issue with resize component in community builder. Currently I added to init window.addEventListener but I know - LOCKER SERVICE: controller: doinit : function(component) { ...
0
votes
0answers
38 views

Event.target doesn't work under Locker service

controller.js selectedValue: function(component, event, helper) { let componentDiv = event.target; let searchString = document.createRange(); } component: <aura:iteration items="{!v....
1
vote
1answer
76 views

Is it possible to using Intersection Observer javascript in LWC?

I'm trying to do some UX updates to a component and I'd like to use the Intersection Observer functionality (https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) to show/hide a ...
0
votes
1answer
43 views

Integration of tinyMce with LWC is not working

I am trying to use tinyMce Rich text editor in an application based on LWC instead of lightning-input-rich-text. I uploaded tinymce.min.js file in static resources and is using that in my component ...
5
votes
1answer
420 views

Locker Service - cannot push to object array

This is very odd. This basic functionality does not work for some reason. App controller: ({ add : function(component, event, helper) { var items = component.get('v.obj') var ...
3
votes
1answer
2k views

Is it possible to disable Locker Service for Lightning Web Components? (I mean LWC and not Aura Components!)

Is it possible to disable Locker Service for Lightning Web Components? For Aura Components it goes like this: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/...
6
votes
1answer
612 views

jquery version 2.2.4 with lightning component version 40

Before summer 17, the jquery version 2.2.4 was working well with locker service. Now, with summer 17, we have locker service enabled automatically. With this, if we update our components to version 40,...
2
votes
1answer
1k views

New CSP violation spontainiously happening in lightning

I have some code in a visualforce page that used a custom js library to build an excel file client side from an object generated on the server side and then force the browser to download the file. ...
1
vote
1answer
2k views

JavaScript Error: Uncaught (in promise) undefined - when using FullCalendar 4.4.0 in LWC component

I am trying to use FullCalendar 4.4.0 Timeline View inside a LWC component. html <template> <section class="slds-card slds-p-around_medium"> <div class="calendar" lwc:dom="...
0
votes
0answers
31 views

Lightning button stopped working - Uncaught TypeError - aura_prod.js - TypeError: 'getOwnPropertyDescriptor' on proxy

I am getting below js error - TypeError: 'getOwnPropertyDescriptor' on proxy: trap returned descriptor for property 'length' that is incompatible with the existing property in the proxy target I have ...
5
votes
1answer
2k views

Programatically add focus on ui:inputText

I'm afraid I'm hitting a limit of Lightning here, but I'd thought I ask here as a last resort. I want to programmatically add focus on a field in a form. I now have code like this; Markup: <ui:...
5
votes
5answers
2k views

FullCalendar V4 is not working in lightning component

I am trying to show calendar view using fullcalender.io v4 in lightning component. Initially the fullcalender loads without any issue but when I hover over the calender UI, I'm getting the below ...
0
votes
1answer
49 views

Lightning Locker is blocking HTMLScriptElement

I'm trying to inject a script into the lightning page by adding the JS Script into the pagebut i'm not able to see any Error or script in the page from Locker Compatibility HTMLScriptElement element ...
5
votes
1answer
882 views

Embedding Tweet on Lightning Component 2

My component: <aura:component description="TwitterTile"> <ltng:require scripts="{!$Resource.Lib + '/js/twitter.js'}" <blockquote class="twitter-tweet" data-lang="en"> <...
5
votes
1answer
626 views

Lightning Component and JS error Spring 18 (API V42). Working fine on API V41

I have traced the execution of code and as soon as the execution of our code is over it goes straight to an Error from SF. no errors are thrown prior to this and the last line of code executed is },...
0
votes
1answer
500 views

lightning:actionOverride set Page Title

I've create a lightning component which implements lightning:actionOverride, for use as a custom new record page. I've created an object called "Custom Object" with API Name "CustomObject__c" ...
12
votes
1answer
978 views

mCustomScrollbar not working when Locker Service is enabled in Salesforce-1

I am having problem when using mCustomScrollbar (GIT Hub) when locker service is activated. During initialization of mCustomScrollbar in the helper, it throws the following error [TypeError: ...
3
votes
1answer
2k views

Not able to access event.currentTarget when locker service is enabled

There's a question already asked regarding this here Issue with event.currentTarget According to Salesforce Known Issues , they've updated that it has already been fixed in almost all the servers (...
1
vote
1answer
31 views

Load scripts in lightning web component with out strict mode

I'm trying to load a library into a lightning web component. The library itself has comments in it that say it shouldn't run in strict mode which I think is what's causing my issue since I can get the ...
11
votes
3answers
4k views

Modern JavaScript Frameworks (Angular Js, React JS ) within LWC

As documented on the below link, https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.get_started_supported_javascript Lightning Web Components Javascript support includes :...
1
vote
0answers
135 views

Failing this.template.querySelector

I have a component and am trying to retrieve an element from the template using querySelector, as follows: const elt = this.template.querySelector('.thunder-ng'); But instead of returning the element,...
0
votes
0answers
19 views

Global marker for UI test automation in aura

What is a good way to set a "marker" for a UI test automation? Right now my application has quite a bit of background server calls that I want to wait to complete. I am considering adding ...
0
votes
1answer
39 views

Dynamically alter CSS depending on Salesforce standard split view mode being expanded or collapsed

When I am trying to view a record detail page in split view mode I have to alter CSS on my custom component depending on whether the Split view section is expanded or collapsed. In order to accomplish ...
2
votes
1answer
287 views

LWC: Second async child function call fails

I would like to call an async function on a child component from its parent. This works the first time I call the function, but the second time, I get a "Sorry to interrupt" error with this:...
0
votes
1answer
26 views

WheelEvent constructor does not work in LockerService

When trying to create a WheelEvent using its constructor, I was unable to do so, despite the WheelEvent being clearly marked as supported in the Locker Api Viewer. The issue is reproducible easily by ...
4
votes
3answers
1k views

Stripe integration for Salesforce in lightning components

We are trying to implement Stripe integration with Salesforce by using Lightning Components for payments. Stripe use an API for securely obtain the users card information. This API is for the client,...
0
votes
0answers
104 views

Closing a jquery dialog from a LWC (contained inside the dialog box) and reload the standard record page

I have a requirement where on a classic Salesforce Account page I have to show a custom button. On User click I have to show a popup where user does some interaction and from the popup itself when the ...
3
votes
1answer
50 views

LockerService Range.commonAncestor readonly field returns a function instead of a Node (or SecureElement)

I've found a strange behavior with LockerService and I do not understand the current behavior. I want to use Range.commonAncestorContainer but when I try to use this getter, I get a function instead ...
1
vote
0answers
215 views

Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'

There is library written in vanilla js for datatable Vanilla-Datatables, I am trying to use that library to create datatables. HTML: <template> <div class="container-fluid"> ...
0
votes
0answers
36 views

How do I use Salesforce Locker console to evaluate a library? [duplicate]

There is a requirement of using an external Javascript library for excel file generation(xlsx). I was planning to use Sheetjs or exceljs to achieve the same, but wanted to know how to evaluate the ...
0
votes
2answers
280 views

Locker Service Compatibility with CMS Connect

We are doing some work on integrating AEM as the CMS connection in a Salesforce Lightning Community page using CMS Connect and the Lightning Builder but have run into some issues with the Locker ...
3
votes
1answer
2k views

document.getElementById(“myID”).getComputedTextLength() is not a function

I have developed a lightning component, I am using following JavaScript methods .getComputedTextLength() .getScreenCTM() .getTotalLength() .getBBobx() I am getting following errors ...
3
votes
0answers
425 views

Google Analytics Event Tracking in Community using LWC

I'd like to use Google Analytics Event Tracking inside a Community in LWC We have Google Analytics configured in Builder > Settings > Advanced > Google Analytics The documentation says to ...
2
votes
2answers
5k views

Using Google Maps in Lightning Components

I need to implement Google Maps in Lightning Components. With So much of research, I get to know the following things External CDN cant be used in Component which is described as security feature of ...
0
votes
0answers
30 views

Salesforce Locker Service problem with Kekule JS

I am facing issue with lightning locker service when trying to use Kekule javascript library. Loaded IO and other specific JS from the following library in static resource. https://partridgejiang....
3
votes
1answer
1k views

Animate custom refresh lightning-button-icon LWC

I want animate a lightning-button-icon as the standard Salesforce refresh button in LWC. I've already seen a related question but the answer was not conclusive, at this point I don't know if it's ...
0
votes
0answers
56 views

Lightning Locker Service is not allowing to use Web3.js library in lightning components

I have a requirement to use web3.js library in my lightning component but lightning locker service is not allowing to use that library and i am getting following error: "Custom Script Eval error in '...
21
votes
2answers
5k views

Avoid Proxy objects in debug statements for a Lightning component

This may be a very basic questions, but I don't seem to find the answer for it! Basically I want my console.log statements to show all the good stuff instead of the LockerService Proxy object. Is ...
2
votes
0answers
55 views

Are URLs for Salesforce files brittle?

I'm using Salesforce Files with enhanced letterheads with a URL like the following: <img alt="Company_letterhead_header" src="https://my-domain--c.na191.content.force.com/file-asset-public/...
1
vote
0answers
115 views

How to add Custom HTML in Lightning Component Dropdown Menu? [closed]

I'm trying to create a dropdown menu with specialized internal options. SLDS Menu - https://lightningdesignsystem.com/components/menus/ Respective Lightning Component for this is - https://...
1
vote
0answers
357 views

Can access elements with template.querySelectorAll() in Local Dev Server, but not with Locker Service running

I have written a custom LWC with some nested accordians. I have a function that expands all similarly named child accordion sections in the each of the parent accordion sections. I was able to get it ...
0
votes
1answer
432 views

How to access the contents of a SecureNodeList in Lightning Components

I am currently trying to access a SecureNodeList, but I keep running into errors. Before I go into depth more, I will explain what I am trying to do first, before I end up with an X-Y Problem. My aim ...

1
2 3 4 5
8