Questions tagged [locker-service]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
21 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
28 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 ...
1
vote
0answers
80 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 ...
1
vote
1answer
264 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
27 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....
2
votes
0answers
91 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
0answers
40 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 '...
2
votes
1answer
331 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 ...
2
votes
0answers
37 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
48 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
181 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
240 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 ...
0
votes
1answer
127 views

Locker Service Blocking Access to Third-Party Object

I'm running into a scenario where I can't tell if Locker is preventing accessing an API call from a third-party script that's been whitelisted. I'm using Qualtrics survey tool to poll users on our ...
3
votes
1answer
47 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
611 views

LWC: Using lwc:dom=“manual” to reach and interact with a certain DOM element

I am trying to find a way to interact with the built-in chat widget. I need to simulate a click on it. I understand that the Locker Service is there to prevent any interaction outside of the DOM of ...
0
votes
0answers
125 views

Script in ltng:require Blocked by Locker Service

I added a JavaScript file to a Static Resource and I'm using ltng:require to reference it in a Lightning component. <ltng:require scripts="{!$Resource.MyCommunity + '/js/myscript.js'}" ...
1
vote
1answer
640 views

Handsontable 3rd party library not working in LWC

Handsontable is a neat looking spreadsheet plugin for Javascript. I can't get even the quick start to display in an LWC component. It seems to initialize but the data never shows up. As far as I ...
5
votes
2answers
2k 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 :...
0
votes
1answer
289 views

Is it possible to call an intranet or local server using a lightning component?

For example, if a local server outputs a JSON with sensitive information, and I can access it through my local network, can I access this data using a lightning component?
3
votes
1answer
1k 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/...
3
votes
0answers
370 views

AuraError: Error at new Aura.externalLibraries

Background I am using this approach Call REST API from Lightning Components without Named Credentials to call the Salesforce REST API from a Lightning component. It works when I call this URL: /...
0
votes
1answer
679 views

jQuery/DataTable methods in Lightning Web Component - (…).DataTable is not a function

I'm trying to write a Lightning Web Component which uses jquery and datatable static resources and getting an annoying error message without any idea how to solve it. My html code is: <div class="...
0
votes
1answer
170 views

Lightning data locker restricting Javascript for CSS/HTML

I am trying to retrieve JavaScript Static resource in Community lightning component to override the numbering from Unescaped html. But the data locker service is blocking the script. Am trying to ...
1
vote
1answer
385 views

LockerService seems to be blocking adding new properties to JS objects in LWC [duplicate]

I am facing issue with LWC, probably connected to the LockerService's Proxy objects. My code I am getting the list of custom objects defined in one of my Apex classes by calling Apex method from LWC ...
0
votes
2answers
292 views

Locker Service and 3rd party library, how to pass Security review?

Is it a way to use 3rd party library/framework like Vue/Angular and bypass security review by Salesforce. Because only option to use those kind of library seems possible with version 39.0 which is ...
5
votes
5answers
1k 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 ...
2
votes
0answers
643 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 ...
1
vote
1answer
79 views

Iframe allow tag not supported in lightning component?

I tried adding the allow="microphone" tag in iframe that I added in salesforce lightning component, but when I load the page it throws a Uncaught AuraFriendlyError. Is it not supported, also if not is ...
1
vote
0answers
201 views

LockerService Error while using Range.setStart

Why does LockerService Error while using Range.setStart? Getting the error "Failed to execute 'setStart' on 'Range': parameter 1 is not of type 'Node'. This is when using popper.js dependency in a ...
1
vote
0answers
150 views

SVG API incomplete in LWC/Locker

I want to create a custom component that wraps the yFiles for HTML graph drawing component in an LWC component, but it seems some of the SVG API is not implemented or rather hidden behind the locker ...
0
votes
1answer
120 views

Uncaught SecureElement.innerHTML cannot be used with BODY elements! when using dhtmlxGantt in Lightning Component

I am trying to use dhtmlxGantt inside a Lightning Component. CMP <aura:component implements="flexipage:availableForAllPageTypes"> <ltng:require styles="{!$Resource.dhtmlxgantt_css }" /&...
1
vote
1answer
2k views

Blocked by CORS policy: No 'Access-Control-Allow-Origin' header on the requested resource

I am trying to use a Google Charting library inside a Lightning Aura Component. Component <aura:component implements="flexipage:availableForAllPageTypes"> <ltng:require scripts="{!$...
1
vote
1answer
60 views

invoking .click() function in lightning component

Client needs demand that we don't use the default SLDS style for the file uploads. Basically, have a specific icon we have to use for uploads which isn't the SF one. In prior releases, we were able ...
2
votes
1answer
379 views

How can you get the caret position when working from an event?

Looking at the Locker documentation they list selectionStart as being a valid attribute, but I can't find a way to access it. I am trying to write an input masking utility, and everything works fine ...
3
votes
0answers
140 views

Using postMessage across different namespaced components

In Salesforce, postMessage is mainly used for communicating in between Visualforce and Lightning components Communicating between Lightning Components and Visualforce Pages Window.postMessage() ...
1
vote
2answers
1k views

access Target Element in Proxy

i have the following line: var childCmp = cmp.find("lookupCmp"); My Lightning component API Version is 44.0 lookupCmp is a custom lightning component. When i run this line i get: childCmp = ...
3
votes
1answer
80 views

Why ECMAscript 6 Object.freeze not working with Locker Service?

We have a library we created using ECMACScript 6 that we transpiled using babel that worked perfectly with a VisualForce page. Migrating this library to work with Locker Service I found that Object....
0
votes
2answers
551 views

Alternative for javascript window method for visualforce pages in lightning

With the lightning readiness report there is mention that javascript window method won't perform as supposed to in Lightning. Salesforce documentation suggest sforce.one navigation methods to replace ...
6
votes
1answer
1k views

Locker service and lightning web components

Is there any documentation yet on how locker service fits in with lightning web components? If yes, What are the implications of locker service on lightning web components? What are locker service ...
3
votes
0answers
198 views

Is it possible to disable mobile touch on a Salesforce community

Background I have a community page which displays a calendar by FullCalendar The calendar is in a Lightning Component. Both Salesforce Communities and FullCalendar support mobile devices. ...
0
votes
1answer
57 views

Locker Service and CSS in JS

Without trying this myself I was curious if anyone else was able to get CSS in JS to work within the confines of LockerService. At first glance it looks like styled-components might actually work as ...
1
vote
1answer
214 views

Only 1 of 3 JavaScript files load when using <ltng:require> and afterScriptsLoaded event not firing

Background I am trying to use the PageDown JavaScript library: Markdown.Converter.js - (click to view source) Markdown.Editor.js - (click to view source) Markdown.Sanitizer.js - (click to view ...
4
votes
2answers
875 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,...
3
votes
1answer
152 views

Multi thread in lightning component script

im looking for some method to divide thread in my lightning component JS. As far as I know is JS running on single thread. but web.Worker function can be alternative. i tried to use web.worker .. ...
0
votes
1answer
61 views

loop through components looking for data in it

im building a list that people select only a single item which works in a limited capacity but reloading or re-selecting isnt very user friendly. the basic concept is a controller retrieves selections,...
8
votes
2answers
309 views

accessing a lighning inputField lookup name client side

I am easily able to fetch a lookup ID from a inputField <lightning:recordEditForm objectApiName="Case"> <!-- the messages component is for error messages --> <...
11
votes
3answers
1k views

Lightning support for eval() in Summer 18

I thought that eval() was supported in Lightning in Summer 18. According to the release notes, it is: The eval() function is now available in Locker Service, even when Strict CSP is enabled. This ...
2
votes
1answer
458 views

Library import not working

I am trying to import a library into Salesforce Lightning using ltng:require. Problem is, when I try to use some of the objects from the library in my controller, it can't find those objects. I have a ...
1
vote
1answer
179 views

Cannot read property 'Converter' of undefined, when using StackExchange PageDown Library in Lightning Component

BACKGROUND I am trying to use the PageDown JavaScript library: Markdown.Converter.js - (click to view source) Markdown.Editor.js - (click to view source) Markdown.Sanitizer.js - (click to view ...
0
votes
1answer
82 views

Using princexml and PDFreactor in Lightning component with version 43.0

I want to know if Salesforce allows princexml or PDFreactor js library to work if locker service is enabled. This files are used to convert html to PDF

1
2 3 4 5
8