Skip to content

Commit

Permalink
Channeling inline spirit for real this time
Browse files Browse the repository at this point in the history
  • Loading branch information
wiredearp committed Mar 15, 2018
1 parent 7ad4dc8 commit e3c27df
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/dist/sri.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"@js": {
"hashes": {
"sha384": "CJBf5i8idVm7hx8SVH9CTWGbIVMpKGUWgDeZuZohBw3J8N/IG8xMUMMNDYa2p90P"
"sha384": "2CU9+cqX1LT3T2R1nFt8RddO1HgT8+cWx6pbhTMcIkCSqCejeN/fIA69gGyoUrZ5"
},
"integrity": "sha384-CJBf5i8idVm7hx8SVH9CTWGbIVMpKGUWgDeZuZohBw3J8N/IG8xMUMMNDYa2p90P",
"integrity": "sha384-2CU9+cqX1LT3T2R1nFt8RddO1HgT8+cWx6pbhTMcIkCSqCejeN/fIA69gGyoUrZ5",
"path": "public/ts-10.0.13.min.js"
},
"@css": {
Expand Down
10 changes: 10 additions & 0 deletions spec/spiritual/spiritual-gui/general/channeling.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ describe('Channeling and exorcising spirits', function likethis() {
});
});

it('should possess the inline spirit (not channeled)', function(done) {
window.MySpirit = ts.ui.Spirit.extend();
var sandbox = this.sandbox;
sandbox.innerHTML = '<div data-ts="MySpirit"></div>';
sometime(function later() {
expect(hasSpirit(sandbox.firstChild)).toBe(true);
done();
});
});

it('should possess on appendChild', function() {
var elm = getSpiritElm();
this.sandbox.appendChild(elm);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,9 @@ gui.Assistant = (function using(Crawler) {
*/
_spiritconstructor: function(thing) {
return (
typeof thing === 'object' &&
thing.ancestors &&
typeof thing.ancestors === 'function' &&
thing.ancestors().indexOf(gui.Spirit) > -1
typeof thing === 'function' &&
thing.$classname &&
gui.Class.ancestors(thing).indexOf(gui.Spirit) > -1
);
}
};
Expand Down

0 comments on commit e3c27df

Please sign in to comment.