v-event-outside

Just in case you're still salivating for more outside events, this one will catch 'em all.

The element firing the event is highlighted in red.

The large #test element, as well as elements #a through #e are declared as v-event-outside.jquery and, as such, will respond to native and jquery events.

Elements #f through #i are declared only as v-event-outside and will only respond to native events. These elements have thicker borders so they stand out.

(Hint: The show gets really exciting after about 30,000 iterations.)

Firing "customEvent" every:
{{speed / 1000}} second{{ speed != 1000 ? "s" : ""}}
Event type:
var event = document.createEvent('Event');
	event.initEvent('customEvent', true, true);
	randomElement.dispatchEvent(event);
$(randomElement).trigger("customEvent");
test
a
b
c d e
f
g h i

v-event-outside example

		

		<script>
			export default {
				methods: {
					onCustomOutside(e, el) {
						console.log("onCustomOutside");
						console.log("Event:", e);
						console.log("Element that the custom event fired out of:", e.target);
						console.log("Element that finds custom events very exotic:", el);
					}
				}
			}
		</script>