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

As a fragment developer, I would like to be able to access the fragmentEntryLinkNamespace from the javascript.

    Details

    • Type: Feature Request
    • Status: Needs More Information
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Having access to fragmentEntryLinkNamespace from Javascript is not necessary for most of our own development. But, this become very helpful when working with other JS Libraries for integrations and such. Many of theses Libraries still require you to pass an ID for the dom node that they will be instantiated in. It's in these cases that it would be very helpful to have direct access to a unique ID from javascript. Of course we could always get this via "fragmentElement.querySelector('.my-class').getAttribute('id')" but that's a little cumbersome.

       

      It would make it possible to do this:

      // index.html
      
      <div id="placeholderDiv-${fragmentEntryLinkNamespace}"></div>
      // index.js
      // function(fragmentElement, configuration, fragmentEntryLinkNamespace) {
      dummyFramework.component.render(`placeholderDiv-${fragmentEntryLinkNamespace}`);
      

      Instead of this:

      // index.html
      
      <div class="placeholder" id="placeholderDiv-${fragmentEntryLinkNamespace}"></div>
      // index.js
      // function(fragmentElement, configuration) {
      const id = fragmentElement.querySelector('.placeholder').getAttribute('id');
      dummyFramework.component.render(id);
      

       

       

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            evan.thibodeau Evan Thibodeau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package