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

Update docs to expose/detail default XTagElement render() features #17

Open
csuwildcat opened this issue Apr 1, 2018 · 4 comments
Open

Comments

@csuwildcat
Copy link
Member

Need a section detailing this feature/API

@ghost
Copy link

ghost commented Apr 2, 2018

I was thinking that as well, I will look if I actually started to do any think regarding that. I don't believe so. I will have time to work on this tonight. It will get added to the pull request commits.

@ghost
Copy link

ghost commented Apr 4, 2018

Sorry I just now am starting to take a dive into this now. I'm going to start this topic right before the The DL on Events section and make reference to it in intro material of Content is King section.`

@csuwildcat how does that sound?

@ghost
Copy link

ghost commented Apr 4, 2018

The section before mentions guides on pseudos' and extensions I think that the repo wiki would be a good place to house contributor created guides, did you have a different place to put contributor ones or did you want to reference a different guide or none at all?

The reason I ask is that I am going to mention how the render() method plays it role in the ::template and it would be nice to be able to mention guides that involve use of libs like cytoscape.
EDIT -- At least as far as place to go that is verifiable and safe.

@ghost
Copy link

ghost commented Apr 7, 2018

I used the snippet below for an example, will this do?

var _rendered = xtag.create( "x-mode", class extends XTagElement {
  set 'mode::attr'(_mode) {
    this.render(_mode);
    return _mode;
  }
  get 'mode::attr'(){ 
    return this.getAttribute("mode"); 
  },
  'myModeSnippet::template'() {
    return "My creation has come to be,Rendered.";
  }
  'click::event'(e){
    e.target.mode = e.target.mode;
  }
} );

EDIT = > :) Just tested the above code on my windows machine and it worked as expected.

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

No branches or pull requests

1 participant