Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*
*/
var Montage = require("montage").Montage;
var ModelHelper = require("spec/meta/blueprint/model-helper").ModelHelper;
var model = ModelHelper.companyModel();
var objectDescriptor = model.objectDescriptorForName("Company");
var Company = exports.Company = objectDescriptor.create(Montage, {
// Token class
});
/*
*/
var Montage = require("montage").Montage;
var ModelHelper = require("spec/meta/blueprint/model-helper").ModelHelper;
var model = ModelHelper.companyModel();
var objectDescriptor = model.objectDescriptorForName("Person");
var Person = exports.Person = objectDescriptor.create(Montage, {
// Token class
});
exports.__reset__ = function() {
_descriptorsDirectory = Object.create(null);
_willChangeDescriptorsDirectory = Object.create(null);
_willChangeDescriptorsIndexesDirectory = Object.create(null);
_changeDescriptorsDirectory = Object.create(null);
_changeDescriptorsIndexesDirectory = Object.create(null);
// also need to remove all installed setters
};
exports.__debug__ = function() {
console.log("_descriptorsDirectory", _descriptorsDirectory);
console.log("_willChangeDescriptorsDirectory", _willChangeDescriptorsDirectory, _willChangeDescriptorsIndexesDirectory);
console.log("_changeDescriptorsDirectory", _changeDescriptorsDirectory, _changeDescriptorsIndexesDirectory);
};
var ChangeNotification = exports.ChangeNotification = Object.create(Montage, {
// (object) => .uuid
//
// (target_n): {
// : {
// target,
// propertyPath,
// willChangeListeners: {
// (listener_n): {
// listenerTarget,
// listenerFunction,
// listensToMutation
// }
// },
// changeListeners: same as willChangeListeners,
// willChangeListenersCount: Object.keys(willChangeListeners).length,
// changeListenersCount: Object.keys(changeListeners).length,
var Montage = require("montage").Montage;
exports.AppDelegate = Montage.create(Montage, {
deserializedFromTemplate: {
value: function() {
console.log('app-delegate deserialized');
console.log(window.location.hash);
}
}
});
Deserializer = require("core/deserializer").Deserializer,
logger = require("core/logger").logger("binding"),
defaultEventManager = require("core/event/event-manager").defaultEventManager,
AT_TARGET = 2,
UNDERSCORE = "_";
/**
@class module:montage/core/event/binding.ChangeEventDispatchingArray
*/
var ChangeEventDispatchingArray = exports.ChangeEventDispatchingArray = [];
/**
@class module:montage/core/event/binding.PropertyChangeBindingListener
@extends module:montage/core/core.Montage
*/
var PropertyChangeBindingListener = exports.PropertyChangeBindingListener = Object.create(Montage, /** module:montage/core/event/binding.PropertyChangeBindingListener# */ {
useCapture: {value:false, writable: true},
target: {value: null, writable: true},
originalListener: {value: null, writable: true},
originalListenerIsFunction: {value: false, writable: true},
targetPropertyPath: {value: null, writable: true},
//This is added for bindings, but could be used for addEventListener for property change as well
/*
* bindingOriginValueDeferred specifies wether an update to the value of bindingOrigin is pushed automatically or on-demand.
*/
bindingOriginValueDeferred: {value:false, writable: true},
/*
* deferredValue contains the value to push on target when bindingOriginValueDeferred is true.
*/
deferredValue: {value:null, writable: true},
/*