This file contains hidden or 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
<html> | |
<head> | |
<title>Testing!</title> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/stream-chat-react@latest/dist/css/index.css"></link> | |
<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script> | |
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script> | |
<script src="https://cdn.jsdelivr.net/npm/stream-chat@latest" crossorigin></script> |
This file contains hidden or 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 GameTreeNode { | |
constructor(obj = {}) { | |
this.parentNode = obj.parentNode || null; | |
this.upNode = null; | |
this.rightNode = null; | |
this.downNode = null; | |
this.leftNode = null; | |
this.minScore = obj.parentNode ? obj.parentNode.minScore + 1 : 0; |
This file contains hidden or 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 GameTreeNode { | |
constructor(obj = {}) { | |
this.parentNode = obj.parentNode || null; | |
this.upNode = null; | |
this.rightNode = null; | |
this.downNode = null; | |
this.leftNode = null; | |
this.minScore = obj.parentNode ? obj.parentNode.minScore + 1 : 0; |
This file contains hidden or 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
import Ember from 'ember'; | |
export function optionalFunction(orderedArgs/*, namedArgs*/) { | |
const actionFn = orderedArgs[0]; | |
return function (event) { | |
return actionFn ? actionFn(event) : undefined; | |
}; | |
} | |
export default Ember.Helper.helper(optionalFunction); |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
prop: 'a', | |
actions: { | |
setPropToA() { | |
this.set('prop', 'a'); | |
this.notifyPropertyChange('prop'); | |
}, |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions: { | |
handleClickOnA: function () { | |
alert('a was clicked'); | |
} | |
} |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions: { | |
reportClick(element) { | |
alert(element); | |
} | |
} |
This file contains hidden or 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
new Firebase('https://handle-experimental.firebaseio.com/userEntities') | |
.orderByChild('chromeSettings/handle_@@_chromeSettings_@@_common_@@_ID/lastSeen') | |
.startAt("2015-10-27T00:00:00.000Z") | |
.on('child_added', function (snapshot) { | |
console.log(snapshot.val()); | |
}); |
This file contains hidden or 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
Integrating with Forms | |
[ ] hidden input field with id matching <trix-editor>'s input attr | |
Populating wth Stored Content | |
[ ] To populate a <trix-editor> with stored content, include that content in the associated input element’s value attribute. | |
Storing Attached Files | |
[ ] provide Trix with a permanent URL for attached files | |
[ ] to store attachments, listen for the trix-attachment-add event | |
[ ] call preventDefault() on the trix-file-accept event to disallow attachments |