@@ -95,14 +95,17 @@ function init(display, container, module, ports, moduleToReplace) {
9595 // create the actual RTS. Any impure modules will attach themselves to this
9696 // object. This permits many Elm programs to be embedded per document.
9797 var elm = {
98− notify:notify,
99− setTimeout:setTimeout,
100− node:container,
101− display:display,
102− addListener:addListener,
103− inputs:inputs,
104− timer:timer,
105− ports: { incoming:ports, outgoing:{}, uses:portUses }
98+ notify: notify,
99+ setTimeout: setTimeout,
100+ node: container,
101+ addListener: addListener,
102+ inputs: inputs,
103+ timer: timer,
104+ ports: { incoming:ports, outgoing:{}, uses:portUses },
105+
106+ isFullscreen: function() { return display === Display.FULLSCREEN; },
107+ isEmbed: function() { return display === Display.COMPONENT; },
108+ isWorker: function() { return display === Display.NONE; }
106109 };
107110
108111 function swap(newModule) {
@@ -169,7 +172,13 @@ function checkPorts(elm) {
169172 }
170173 }
171174}
172−
175+
176+
177+//// FILTER SIGNALS ////
178+
179+// TODO: move this code into the signal module and create a function
180+// Signal.initializeGraph that actually instantiates everything.
181+
173182function filterListeners(inputs, listeners) {
174183 loop:
175184 for (var i = listeners.length; i--; ) {