Guest User

Untitled

a guest
Jun 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. class PopUpInfo extends HTMLElement{
  2. constructor(){
  3. super();
  4. this.attachFunctionality();
  5. }
  6. attachFunctionality(){
  7. var shadow = this.attachShadow({mode:'open'});
  8. var span = document.createElement("span");
  9. span.innerHTML = "Hi Rakesh! your first html Element... Congratulations ...";
  10. shadow.appendChild(span);
  11. }
  12. }
  13.  
  14. (function(){
  15. alert("hello");
  16. customElements.define("pop-up-info", PopUpInfo);
  17. }())
  18.  
  19. // In Html add element <pop-up-info></pop-up-info>
Add Comment
Please, Sign In to add comment