Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-135643

When developing an app/fragment I want a straightforward way to know all content has been loaded in the page

    Details

    • Type: Story
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JS APIs and Utilities
    • Labels:
      None

      Description

      Traditionally, widget pages triggered the allPortletsReady event when all portlets DOM was rendered. This event has been used to denote the fact that page was "ready", so that no extra content would be added to the page after it.

      This has 2 essential problems:

      • The assumption of "all content in the page is loaded" is fundamentally weak. Ajaxable portlets and JS-widgets might break it very easily
      • In a content page, with no portlets, the event is not being triggered. Also, in case there are portlets, the presence of fragments which also add content to the DOM may defeat the purpose of that event.

      Whereas the first problem is rather general, and apps may work well if they have not to deal with edge cases, the second one has a very specific, direct implication: it forces fragment developers to add a lot of context to their fragments.

      The goal of this story is to provide a wrapper over DOMContentLoaded event which can work equally well in SPA scenarios, so that JS code in applications/fragments can rely on that to know that the content was loaded.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              daniel.sanz Daniel Sanz
              Recent user:
              Daniel Sanz
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package