This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $ = go.GraphObject.make; // for conciseness in defining templates | |
myDiagram = $(go.Diagram, "myDiagramDiv", // create a Diagram for the DIV HTML element | |
{ | |
initialContentAlignment: go.Spot.Center, // center the content | |
"undoManager.isEnabled": true // enable undo & redo | |
}); | |
// define a simple Node template | |
myDiagram.nodeTemplate = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Animal { | |
constructor(name) { | |
this.name = name; | |
} | |
getName() { | |
return this.name; | |
} | |
} | |
class Dog extends Animal { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script type="text/javascript" src="script.js"></script> | |
</head> | |
<body> | |
<div id="button-container"> | |
<button id="add-class">Add Class</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style type="text/css"> | |
#inputField { | |
width: 94px; | |
margin-bottom: 5px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = document.getElementById('list'); | |
list.classList; | |
list.parentNode; | |
list.children; | |
list.style.background = '#fff'; | |
list.childNodes; | |
list.children[0].innerText = 'asd'; //замена элемента | |
list.children[0].innerText += 'asd'; //добавление текста | |
list.children[0].innerHTML = '<p>qwe</p>'; |