Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance context #115

Closed
3 tasks
AndyOGo opened this issue Dec 22, 2017 · 1 comment
Closed
3 tasks

Enhance context #115

AndyOGo opened this issue Dec 22, 2017 · 1 comment

Comments

@AndyOGo
Copy link

AndyOGo commented Dec 22, 2017

The first prototype of an asynchronous context implementation works quite good in production.
Though it isn't feature complete.

  • Multiple contexts
    class AXAFoo extends BaseComponentGlobal {
      constructor() {
        super();
    
        this.enableContext();
      }
    }
    
    class AXABar extends BaseComponentGlobal {
      constructor() {
        super();
    
        this.enableContext();
      }
    }
    
    class AXABaz extends BaseComponentGlobal {
      constructor() {
        super(stylesSticky, templateSticky);
    
        this.selectContext('axa-foo', 'axa-bar');
      }
    
      connectedCallback() {
        super.connectedCallback();
      }
    
      contextCallback(contextNode) {
        // nodeName ist the context's name/key
        const { nodeName } = contextNode;
      }
    }
  • Share contextual Data (not just a contextNode)
  • Contextual Lifecycle methods
    • contextConnectedCallback (just a proposed rename of contextCallback)
    • contextChangedCallback
    • contextDisconnectedCallback
@LucaMele
Copy link
Contributor

closing as new plib version is live. If issue is with v2 still relevant, please re-open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants