mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): retrieve the jsActionMap only once. (#60587)
Before the change, the map was pull on every loop execution. PR Close #60587
This commit is contained in:
committed by
Jessica Janiuk
parent
0c53970aeb
commit
bae7b75ff5
@@ -611,8 +611,8 @@ function gatherDeferBlocksByJSActionAttribute(doc: Document): Set<HTMLElement> {
|
||||
|
||||
export function appendDeferBlocksToJSActionMap(doc: Document, injector: Injector) {
|
||||
const blockMap = gatherDeferBlocksByJSActionAttribute(doc);
|
||||
const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
|
||||
for (let rNode of blockMap) {
|
||||
const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
|
||||
sharedMapFunction(rNode, jsActionMap);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user