Questions tagged [dom]

The tag has no usage guidance.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
22
votes
3answers
1k views

force:navigateToComponent not loading component in Summer '17 | DOM repetition issue in Summer '17

I'm using force:navigateToComponent to navigate to a different component on click. On the first click, it navigates to the component and everything is successfully loaded. When pressing back button ...
4
votes
0answers
582 views

Lightning Web Components: Set scroll position on lightning-datatable based on 'key' field value

We are looking to auto-scroll the user to a specific point in a lightning-datatablewhen a button is clicked. Assuming we referenced the key-field attribute data-row-key-value in the dom then in HTML ...
4
votes
0answers
380 views

How to Address DOM-based XSS from Security Review

I have a remoting function on my page that takes a list of contacts, and displays them in on Lightning Design styled page. It works fine, but the final innerHTML statement gets flagged in security ...
3
votes
0answers
645 views

What is all that <!--render facet: 5:0--> thing in Lightning Pages about?

I know it's a "who cares" question, but somehow I care and I wanted to have this documented somewhere in the WWW :) In Lightning Pages the whole DOM is full of <!--render facet: 5:0--> ...
2
votes
1answer
1k views

How can I test the click of a button that calls an Apex method, and makes the component show a toast?

The component itself, when loaded, queries some data from the database. Then, depending on what it finds, loads the specific template. One of those has a button, which will call the server again, and ...
2
votes
1answer
2k views

Salesforce generating a div with padding when using Lightning Component

I am using lightning component to override my standard 'new' action on custom object. Problem is: Salesforce is generating a DOM element where it puts my lightning component's code. This div has ...
2
votes
0answers
623 views

Lightning Components: what is the easiest way to get the components DOM root element without a wrapper in the markup?

I'm having a couple of very different components and often I need to do some work on the components root DOM-node. Some of the compos have Version<=39.0 other have 40.0+ and therefore I'm not ...
2
votes
1answer
143 views

How do i empty the value in lightning without violating DOM Modification

Component <input onchange="{! c.readCSV}" accept=".csv" type="file" id="file-upload" aura:id="file-upload"/> Controller readCSV : function(component, event, helper){ var file = component....
2
votes
1answer
393 views

Visualforce 'onChange' DOM event not firing when dependent picklist changes to default value

I have a VF page where several field's required attribute is dynamically tied to the value selected on a picklist: <apex:outputPanel id="idAccountField"> <apex:inputfield value="{!...
1
vote
0answers
795 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 ...
1
vote
0answers
229 views

I'm not able to access DOM element even in “afterRender”

I'm trying to create a canvas in my custom lightning component. This is a child component of another component. The canvas draws few charts, and the methods are called only after both the script(...
1
vote
0answers
64 views

Entire page appearing twice in the DOM in LEX?

So the two snippets in this screenshot are the same page loaded in Lightning. This is the "main div" as I can see it that holds the main contents of the page. I promise it is the same page, a standard ...
1
vote
0answers
248 views

How to programmatically identify that no modal is visible on screen?

I want to identify that screen does not have any modal visible, and based on this, I want to show or hide the window's default scrollbar. To show/hide the scrollbar I got excellent solution from this ...
1
vote
0answers
439 views

Can't find variable: $

I'm got this error in lightning while testing in an iPad (issue only occurs in iPad / iOS. All other os , desktop,tablet works fine). My solution is locker service enabled. All the resources like ...
1
vote
1answer
346 views

getBodyDocument - XmlException: unexpected markup &lt;

For example I want to connect to http://www.google.com and get DOM. In Anonymous Window I have code: String url = 'http://www.google.com/'; HttpRequest req = new HttpRequest(); ...
1
vote
0answers
409 views

Apex DOM get children at nth level

I have got the XML of the following format: <parNode> <parNode2> <parNode3> <parNode4 name="name1"> <flags attrVal="1" /> ...
0
votes
1answer
43 views

dataLayer in Lightning component

Can someone tell me how can I access DOM dataLayer in lightning component controller? I'm using like this but its not pushing into DOM dataLayer window.dataLayer = window.dataLayer || []; ...
0
votes
1answer
97 views

LWC third party library DOM changes not applied

I'm trying to use Highcharts charting library in LWC. I have an empty div element, <div class="chart-target" lwc:dom="manual"></div> targeted by the chart. This works well. The problem is ...
0
votes
0answers
122 views

System.SerializationException: Not Serializable: dom.Document for displaying hierarchial Documents

Code is very big hence mentioning only relevant stuff , When I click on 'DocumentCallAll' tab, from the class I am getting the value in string jsonStr1 and then it need to pass on page and display the ...
0
votes
1answer
117 views

Is it possible to add apex:inputFile dynamically to the DOM during runtime with Javascript?

I can add html elements to the DOM but how do I add a VF element such as apex:inputFile? From this post I understand that I can use a wrapper class and apex:repeat but I was wondering if there is ...
0
votes
1answer
101 views

Injecting HTML into a specific location in email

I'm looking for a way to inject HTML into a specific location in an email. I'm thinking something like a javascript DOM. Essentially We have coupons that use a specific set of variables, lets use ...