Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function one(){
- ...../*code*/
- ........
- ../*somewhere in this function i have*/
- var t = document.createElementNS('http://www.w3.org/2000/svg','text');
- t.setAttribute("id", "textError");
- t.textContent = ("hello")
- svgError.appendChild(t);
- }
- function second() {
- one();
- }
- function second() {
- one();
- document.querySelector("#textError").textContent = ("new text");
- }
- function one(textContent){
- ....................
- ....................
- var t = document.createElementNS('http://www.w3.org/2000/svg','text');
- t.setAttribute("id", "textError");
- t.textContent = textContent?textContent:"hello";
- svgError.appendChild(t);
- ....................
- ....................
- }
- function second() {
- one("new text");
- }
- function second() {
- var newText = this.getText();
- one(newText); // one(this.getText());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement