From de1c4f1e725aaf1f19abfb6b16d932f4370dea9f Mon Sep 17 00:00:00 2001 From: CertainPerformance <37674520+CertainPerformance@users.noreply.github.com> Date: Sat, 8 Aug 2020 13:58:53 -0500 Subject: [PATCH 1/2] Make event names more precise Also fix missing parentheses --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 61c88f5..f6006f2 100644 --- a/README.md +++ b/README.md @@ -91,12 +91,12 @@ If you're using a module loader you need to trigger the event listening or initi ```javascript var ElementQueries = require('css-element-queries/src/ElementQueries'); - //attaches to DOMLoadContent + // Attaches to DOMContentLoaded ElementQueries.listen(); -//or if you want to trigger it yourself. +// Or if you want to trigger it yourself // Parse all available CSS and attach ResizeSensor to those elements which have rules attached -// (make sure this is called after 'load' event, because CSS files are not ready when domReady is fired. +// (Make sure this is called after 'DOMContentLoaded' fires, because CSS files are not ready before then.) ElementQueries.init(); ``` From f8f713e5ea9bc003a351776bb79142bf001d3962 Mon Sep 17 00:00:00 2001 From: CertainPerformance <37674520+CertainPerformance@users.noreply.github.com> Date: Wed, 12 Aug 2020 22:02:47 -0500 Subject: [PATCH 2/2] Tweak comments in definition file too --- src/ElementQueries.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ElementQueries.d.ts b/src/ElementQueries.d.ts index 00c5d93..9faa91c 100644 --- a/src/ElementQueries.d.ts +++ b/src/ElementQueries.d.ts @@ -1,12 +1,12 @@ export declare class ElementQueries { /** - * Attaches to DOMLoadContent + * Attaches to DOMContentLoaded */ static listen(): void; /** * Parses all available CSS and attach ResizeSensor to those elements which have rules attached. - * Make sure this is called after 'load' event, because CSS files are not ready when domReady is fired. + * Make sure this is called after 'DOMContentLoaded' fires, because CSS files are not ready before then. */ static init(): void; }