1

There are quite some questions on this Stack Exchange concerning Locker-Service and the impact it has on the development of Lightning Components. Many questions mention things that are disabled or are working differently than expected. Many answers offer good solutions or say the problems will be fixed by Salesforce in a later stadium.

Some background; I was building a Lightning Component for both a Community as for Standard Lightning. I used the new Map() constructor. This worked in Community but gives a Map is not a constructor error in Lightning. it would be helpful if I could go to an official source and read about it instead of asking questions here for each thing I run in to.

Is there a central place where all these things are documented? An official Salesforce source, or perhaps a blogpost? Perhaps it is an idea to create a community wiki answer, listing all these things?

5

We have been working on a number of references like you are looking for and have released a new section in the documentation.auraframework.org open source site (will be incorporate into Salesforce Setup soon) that provides detailed secure virtual DOM support info for the next release (and the upcoming patch to Winter'17 this month). Please take a look at the Locker Service API viewer section. The patch is expected to land on or near 10/18 and addresses nearly all of the open issues, support cases, stack exchange discussions, etc where the root cause is the svDOM or missing exposure of things like Map, Set, Option constructors.

What does not change and has proven to be a fraction of the reasons for incompatability thus far are the "laws of physics" parts of Locker's requirements: Strict Mode and Content Security Policy compliance. These are well establish web security best practices that Locker depends on and are also mandadated by our Security team. To date the most visible non compliant library is D3 version 3.x that has a 1 line bug in its initialization logic that directly refers to "this" expecting it to === window but under strict mode this === undefinedd for "free" functions. D3 v4 works unmodified under Locker as its module handling code has been completely reworked and is now strict mode compliant.

4
  • Beautiful, thank you. Does the Locker Service API view already include things that will be fixed after the upcoming patch? To continue with my example: Map has a green row under both Browser API as Locker API, where I would expect Locker API to be red for now until the patch.
    – Folkert
    Oct 10 '16 at 13:24
  • Yes it represents what will be available after the patch deploys. The viewer at documentation.auraframework.org is running on top of the latest (master) branch of the Aura framework and represents what will be Spring'17. All of the fixes it is showing will also be part of the 10/18'ish patch. Oct 11 '16 at 8:56
  • ... also this tool represents only part of the documentation collateral we will be releasing. Oct 11 '16 at 8:57
  • Doug, can we say that developer.salesforce.com/docs/component-library/tools/… is the successor of the documentation.auraframework.org? Looks similar as what I remember from back then, albeit with a new look and feel.
    – Folkert
    Dec 4 '19 at 12:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.