mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
perf: improve attribute selectors by adding single listeners (#10384)
This commit is contained in:
@@ -5,6 +5,7 @@ import { Trace } from '../../trace';
|
||||
import { isNullOrUndefined } from '../../utils/types';
|
||||
|
||||
import * as ReworkCSS from '../../css';
|
||||
import { CSSUtils } from '../../css/system-classes';
|
||||
|
||||
/**
|
||||
* An interface describing the shape of a type on which the selectors may apply.
|
||||
@@ -1014,6 +1015,9 @@ export class SelectorsMatch<T extends Node> implements ChangeAccumulator {
|
||||
public selectors: SelectorCore[];
|
||||
|
||||
public addAttribute(node: T, attribute: string): void {
|
||||
if (CSSUtils.IgnoredCssDynamicAttributeTracking.has(attribute)) {
|
||||
return;
|
||||
}
|
||||
const deps: Changes = this.properties(node);
|
||||
if (!deps.attributes) {
|
||||
deps.attributes = new Set();
|
||||
|
||||
Reference in New Issue
Block a user