we should trigger change event manually in the newest ChromeHeadless
545750
function fixInputChange(input) {
    let files;
    Object.defineProperty(input, 'files', {
        set(v) { files = v; dispatchEvent(input, 'change'); },
        get(v) { return files }
    });
}
1159355
@Override
    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
        if (evt instanceof HttpServerUpgradeHandler.UpgradeEvent) {
            HttpServerUpgradeHandler.UpgradeEvent upgradeEvent =
                    (HttpServerUpgradeHandler.UpgradeEvent) evt;
            onHeadersRead(ctx, 1, http1HeadersToHttp2Headers(upgradeEvent.upgradeRequest()), 0 , true);
        }
        super.userEventTriggered(ctx, evt);
    }
250832
function () {      
      if (document.body) {        
        // make sure all resources are loaded on first activation
        if (!loaded) Live.loadresources();
        Live.checkForChanges();
      }
      setTimeout(Live.heartbeat, interval);
    }
621145
function _changeHtml(html, onChangeTable) {
  const $tempDiv = $(`<div>${html}</div>`);
  const $tables = $tempDiv.find('table');

  if ($tables.length) {
    $tables.get().forEach(tableElement => {
      const changedTableElement = onChangeTable(tableElement);

      $(tableElement).replaceWith(changedTableElement);
    });

    html = $tempDiv.html();
  }

  return html;
}
1191472
function(compute, newValue, oldValue, batchNum) {
            // Only trigger event when value has changed
            if (newValue !== oldValue) {
                can.batch.trigger(compute, batchNum ? {
                        type: "change",
                        batchNum: batchNum
                    } : 'change', [
                        newValue,
                        oldValue
                    ]);
            }
        }
29447
function (change) {
        var chg = change, cpt = this.cpt;
        if (change.constructor === Array) {
            if (change.length > 0) {
                chg = change[0];
            } else {
                log.error('[CptNode] Invalid change - nbr of changes: '+change.length);
                return;
            }
        }
        this.needsRefresh=true;
        var nm = chg.name; // property name
        if (nm === "") {
            return; // doesn't make sens (!)
        }

        var callControllerCb = true; // true if the onXXXChange() callback must be called on the controller

        var att, isAttributeChange = false;
        if (cpt.$attributes) {
            att = cpt.$attributes[nm];
            isAttributeChange = (att !== undefined);
            if (isAttributeChange) {
                // adapt type if applicable
                var t = att.type;
                if (t) {
                    var v = ATTRIBUTE_TYPES[t].convert(chg.newValue, att);
                    chg.newValue = v;
                    cpt[nm] = v; // change is already raised, no need to trigger another one through json.set()
                }
            }

            if (isAttributeChange && this.nodeInstance) {
                // notify attribute changes to the node instance (and the host) if attribute has a 2-way binding
                if (att._binding === 2) {
                    chg.newValue = this.cpt[nm]; // attribute value may have been changed by the controller
                    this.nodeInstance.onAttributeChange(chg);
                }
            }

            if (isAttributeChange) {
                // check if cb must be called depending on binding mode
                if (att._binding === 0) {
                    callControllerCb = false;
                }
            }
        }

        if (callControllerCb) {
            if (this.processingChange === true) {
                // don't re-enter the change loop if we are already processing changes
                return;
            }
            this.processingChange = true;
            try {
                // calculate the callback name (e.g. onValueChange for the 'value' property)
                var cbnm='';
                if (isAttributeChange) {
                    cbnm=att.onchange;
                }
                if (!cbnm) {
                    cbnm = ["$on", nm.charAt(0).toUpperCase(), nm.slice(1), "Change"].join('');
                }

                if (cpt[cbnm]) {
                    cpt[cbnm].call(cpt, chg.newValue, chg.oldValue);
                }

            } finally {
                this.processingChange = false;
            }
        }
    }
1195718
function(oThis) {
		var oControl = oThis.getControl();
		if (oControl) {
			PositionContainer.cleanUpControl(oControl);
			oControl.detachEvent("_change", onPropertyChanges, oThis);
		}
	}
864518
protected function trigger_on_change() {
        $driver = $this->session->getDriver();
        if ($driver instanceof \Moodle\BehatExtension\Driver\MoodleSelenium2Driver) {
            $driver->triggerSynScript(
                $this->field->getXPath(),
                "Syn.trigger('change', {}, {{ELEMENT}})"
            );
        }
    }
1230350
function fullscreenchange () {
		var newEvent = document.createEvent('CustomEvent');
		newEvent.initCustomEvent('fullscreenchange', true, false, null);
		// TODO: Any need for variable copy?
		document.dispatchEvent(newEvent);
	}
607877
function startWatchingForValueChange(target, targetInst) {
  activeElement = target;
  activeElementInst = targetInst;
  activeElement.attachEvent('onpropertychange', handlePropertyChange);
}
995615
function headless(callback) {
  browserSync.init({
    server: {
      baseDir: "./docs"
    },
    open: false
  });
  watch("src/sass/**/*.scss",{ ignoreInitial: false }, compileSass);
  watch("src/js/**/*.js", { ignoreInitial: false }, compileJS);
  watch("src/index.html", { ignoreInitial: false }, compileHTML);

  callback();
}
1297504
function _handleActiveEditorChange(event, current, previous) {
        if (current) { // Handle only full editors
            if (_mrofList.length === 0) {
                _initRecentFilesList();
            }

            var file = current.document.file;
            var paneId = current._paneId;
            _addToMROFList(file, paneId, current.getCursorPos(true, "first"));
        }

        if (previous) { // Capture the last know cursor position
            _updateCursorPosition(previous.document.file.fullPath, previous._paneId, previous.getCursorPos(true, "first"));
        }
    }
685800
function detectChangesInternal(hostView, hostNode, component) {
    var oldView = enterView(hostView, hostNode);
    var hostTView = hostView[TVIEW];
    var template = hostTView.template;
    var viewQuery = hostTView.viewQuery;
    try {
        namespaceHTML();
        createViewQuery(viewQuery, hostView[FLAGS], component);
        template(getRenderFlags(hostView), component);
        refreshView();
        updateViewQuery(viewQuery, component);
    }
    finally {
        leaveView(oldView);
    }
}
382101
def trigger(self, attr, old, new, hint=None, setter=None):
        ''' 

        '''
        def invoke():
            callbacks = self._callbacks.get(attr)
            if callbacks:
                for callback in callbacks:
                    callback(attr, old, new)
        if hasattr(self, '_document') and self._document is not None:
            self._document._notify_change(self, attr, old, new, hint, setter, invoke)
        else:
            invoke()
858243
function _onActiveEditorChange(event, current, previous) {
        if (previous) {
            previous.off(".statusbar");
            previous.document.off(".statusbar");
            previous.document.releaseRef();
        }

        if (!current) {
            StatusBar.hideAllPanes();
        } else {
            var fullPath = current.document.file.fullPath;
            StatusBar.showAllPanes();

            current.on("cursorActivity.statusbar", _updateCursorInfo);
            current.on("optionChange.statusbar", function () {
                _updateIndentType(fullPath);
                _updateIndentSize(fullPath);
            });
            current.on("change.statusbar", function () {
                // async update to keep typing speed smooth
                window.setTimeout(function () { _updateFileInfo(current); }, 0);
            });
            current.on("overwriteToggle.statusbar", _updateOverwriteLabel);

            current.document.addRef();
            current.document.on("languageChanged.statusbar", function () {
                _updateLanguageInfo(current);
            });

            _updateCursorInfo(null, current);
            _updateLanguageInfo(current);
            _updateEncodingInfo(current);
            _updateFileInfo(current);
            _initOverwriteMode(current);
            _updateIndentType(fullPath);
            _updateIndentSize(fullPath);
        }
    }
1232161
public void onChangeEditingState(GeometryEditChangeStateEvent event) {
		switch (event.getEditingState()) {
			case DRAGGING:
				mapPresenter.setCursor("move");
				break;
			case IDLE:
			default:
				mapPresenter.setCursor("default");
				redraw();
		}
	}
404078
function onActivateEvent() {
         var _updateLayerFn = this.updateLayer.bind(this); // register to the viewport change notification


         this.vpChangeHdlr = me.event.subscribe(me.event.VIEWPORT_ONCHANGE, _updateLayerFn);
         this.vpResizeHdlr = me.event.subscribe(me.event.VIEWPORT_ONRESIZE, this.resize.bind(this));
         this.vpLoadedHdlr = me.event.subscribe(me.event.LEVEL_LOADED, function () {
           // force a first refresh when the level is loaded
           _updateLayerFn(me.game.viewport.pos);
         }); // in case the level is not added to the root container,
         // the onActivateEvent call happens after the LEVEL_LOADED event
         // so we need to force a first update

         if (this.ancestor.root !== true) {
           this.updateLayer(me.game.viewport.pos);
         }
       }