Creating a plugin to get the context on ready

10 views
Skip to first unread message

Brandon Fleming

unread,
Apr 12, 2016, 3:04:27 PM4/12/16
to cuj...@googlegroups.com
I work with source code (that uses wire) that we don't have access to change. I'm working on a plugin that would allow us the ability to have access to the wire context once it is created. For instance:

return function(options){
   
return {
        context
: {
            ready
: function(resolver, wire) {
               
// how to get context of wired spec here?
           
}
       
}
   
};
}

By context, I mean the same context that would be returned from something like the code below. With a context whose objects have been created and initialized.

require(["wire!root-spec"], function(mainContext) { ... }


Reply all
Reply to author
Forward
0 new messages