Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. function one(){
  2. ...../*code*/
  3. ........
  4. ../*somewhere in this function i have*/
  5.  
  6. var t = document.createElementNS('http://www.w3.org/2000/svg','text');
  7. t.setAttribute("id", "textError");
  8. t.textContent = ("hello")
  9. svgError.appendChild(t);
  10.  
  11. }
  12.  
  13. function second() {
  14. one();
  15. }
  16.  
  17. function second() {
  18. one();
  19. document.querySelector("#textError").textContent = ("new text");
  20. }
  21.  
  22. function one(textContent){
  23. ....................
  24. ....................
  25. var t = document.createElementNS('http://www.w3.org/2000/svg','text');
  26. t.setAttribute("id", "textError");
  27. t.textContent = textContent?textContent:"hello";
  28. svgError.appendChild(t);
  29. ....................
  30. ....................
  31. }
  32.  
  33. function second() {
  34. one("new text");
  35. }
  36.  
  37. function second() {
  38. var newText = this.getText();
  39. one(newText); // one(this.getText());
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement