We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45acd42 commit 20b92efCopy full SHA for 20b92ef
js/forkit.js
@@ -174,12 +174,14 @@
174
function open() {
175
dragging = false;
176
state = STATE_OPENED;
177
+ dispatchEvent( 'forkit-open' );
178
}
179
180
function close() {
181
182
state = STATE_CLOSED;
183
dom.ribbonTag.innerHTML = closedText;
184
+ dispatchEvent( 'forkit-close' );
185
186
187
function detach() {
@@ -319,6 +321,12 @@
319
321
return Math.sqrt(dx*dx + dy*dy);
320
322
323
324
+ function dispatchEvent( type ) {
325
+ var event = document.createEvent( 'HTMLEvents', 1, 2 );
326
+ event.initEvent( type, true, true );
327
+ dom.ribbon.dispatchEvent( event );
328
+ }
329
+
330
/**
331
* Defines a 2D position.
332
*/
0 commit comments