system/src/sc/lang/html/Element.java
public static void initSync() {
      SyncManager.addSyncType(Event.class, new SyncProperties(null, null, new Object[]{"type", "timeStamp", "currentTag"}, null, 0));
      SyncManager.addSyncType(MouseEvent.class, new SyncProperties(null, null, new Object[]{"button", "clientX", "clientY", "screenX", "screenY", "altKey", "metaKey", "ctrlKey", "shiftKey"}, Event.class, 0));
      SyncManager.addSyncType(KeyboardEvent.class, new SyncProperties(null, null, new Object[]{"key", "altKey", "metaKey", "ctrlKey", "shiftKey", "repeat"}, Event.class, 0));
      SyncManager.addSyncType(FocusEvent.class, new SyncProperties(null, null, new Object[]{"relatedTarget"}, Event.class, 0));
      // By default, we'll synchronize any body content this tag has in a read-only way.  When it changes, there's a change event for innerHTML
      // and getInnerHTML() generates the new contents.  Same idea with startTagTxt for attribute changes.
      // Specific DOM type subclasses (e.g. input) have custom attributes that are sync'd for server tags we
      SyncManager.addSyncType(Element.class, new SyncProperties(null, null, new Object[]{
            "startTagTxt", "innerHTML", "style", "class", "clickEvent", "dblClickEvent", "mouseDownEvent", "mouseOutEvent", "mouseMoveEvent",
            "mouseUpEvent", "mouseDownMoveUp", "keyDownEvent", "keyUpEvent", "keyPressEvent", "focusEvent", "blurEvent", "clientWidth", "clientHeight", "offsetLeft", "offsetTop", "offsetWidth", "offsetHeight", "scrollWidth", "scrollHeight"}, 0));
      SyncManager.addSyncType(Select.class, new SyncProperties(null, null, new Object[]{"selectedIndex", "changeEvent"}, Element.class, 0));
      SyncManager.addSyncType(Input.class, new SyncProperties(null, null, new Object[]{"value", "checked", "changeEvent"}, Element.class, 0));
      SyncManager.addSyncType(Textarea.class, new SyncProperties(null, null, new Object[]{"value", "changeEvent"}, Element.class, 0));
      SyncManager.addSyncType(Form.class, new SyncProperties(null, null, new Object[]{"submitEvent", "submitCount", "submitInProgress", "submitError", "submitResult"}, Element.class, 0));
      // We sync this value via the Select tag's selectedIndex. The option tag is not like repeat in that it's one instance rendered over and over with different
      // optionData values. TODO: should a child option tag create a class and the select tag manage the replication like repeat?
      //SyncManager.addSyncType(Option.class, new SyncProperties(null, null, new Object[]{"selected"}, Element.class, 0));
      SyncManager.addSyncType(Window.class, new SyncProperties(null, null, new Object[]{"innerWidth", "innerHeight", "devicePixelRatio"}, null, 0));
      // This class inherits from Element but we are not inheriting the sync properties of Element right now... this api is not for content, just for global events
      SyncManager.addSyncType(Document.class, new SyncProperties(null, null, new Object[]{"mouseDownEvent", "mouseMoveEvent", "mouseUpEvent", new SyncPropOptions("activeElement", SyncPropOptions.SYNC_ON_DEMAND)}, null, SyncPropOptions.SYNC_RECEIVE_ONLY));
      SyncManager.addSyncType(History.class, new SyncProperties(null, null, new Object[]{"popStateEvent"}, null, 0));
      SyncManager.addSyncType(Screen.class, new SyncProperties(null, null, new Object[]{"width", "height"}, null, 0));
   }
/**
    * Can be called at startup by frameworks to allow synchronization of tag objects.  This is helpful for 'serverTags' which
    * are always rendered on the server, but the important properties can be synchronized to the client and parsed and managed with
    * a smaller code footprint, or to mix and match Javascript client tag objects with html server-side rendered objects in a single page.
    */
Can be called at startup by frameworks to allow synchronization of tag objects.  This is helpful for 'serverTags' which
are always rendered on the server, but the important properties can be synchronized to the client and parsed and managed with
a smaller code footprint, or to mix and match Javascript client tag objects with html server-side rendered objects in a single page.
Can be called at startup by frameworks to allow synchronization of tag objects . This is helpful for ' serverTags ' which are always rendered on the server but the important properties can be synchronized to the client and parsed and managed with a smaller code footprint or to mix and match Javascript client tag objects with html server - side rendered objects in a single page .
public static void initSync() {
      SyncManager.addSyncType(Event.class, new SyncProperties(null, null, new Object[]{"type", "timeStamp", "currentTag"}, null, 0));
      SyncManager.addSyncType(MouseEvent.class, new SyncProperties(null, null, new Object[]{"button", "clientX", "clientY", "screenX", "screenY", "altKey", "metaKey", "ctrlKey", "shiftKey"}, Event.class, 0));
      SyncManager.addSyncType(KeyboardEvent.class, new SyncProperties(null, null, new Object[]{"key", "altKey", "metaKey", "ctrlKey", "shiftKey", "repeat"}, Event.class, 0));
      SyncManager.addSyncType(FocusEvent.class, new SyncProperties(null, null, new Object[]{"relatedTarget"}, Event.class, 0));
      SyncManager.addSyncType(Element.class, new SyncProperties(null, null, new Object[]{
            "startTagTxt", "innerHTML", "style", "class", "clickEvent", "dblClickEvent", "mouseDownEvent", "mouseOutEvent", "mouseMoveEvent",
            "mouseUpEvent", "mouseDownMoveUp", "keyDownEvent", "keyUpEvent", "keyPressEvent", "focusEvent", "blurEvent", "clientWidth", "clientHeight", "offsetLeft", "offsetTop", "offsetWidth", "offsetHeight", "scrollWidth", "scrollHeight"}, 0));
      SyncManager.addSyncType(Select.class, new SyncProperties(null, null, new Object[]{"selectedIndex", "changeEvent"}, Element.class, 0));
      SyncManager.addSyncType(Input.class, new SyncProperties(null, null, new Object[]{"value", "checked", "changeEvent"}, Element.class, 0));
      SyncManager.addSyncType(Textarea.class, new SyncProperties(null, null, new Object[]{"value", "changeEvent"}, Element.class, 0));
      SyncManager.addSyncType(Form.class, new SyncProperties(null, null, new Object[]{"submitEvent", "submitCount", "submitInProgress", "submitError", "submitResult"}, Element.class, 0));
      SyncManager.addSyncType(Window.class, new SyncProperties(null, null, new Object[]{"innerWidth", "innerHeight", "devicePixelRatio"}, null, 0));
      SyncManager.addSyncType(Document.class, new SyncProperties(null, null, new Object[]{"mouseDownEvent", "mouseMoveEvent", "mouseUpEvent", new SyncPropOptions("activeElement", SyncPropOptions.SYNC_ON_DEMAND)}, null, SyncPropOptions.SYNC_RECEIVE_ONLY));
      SyncManager.addSyncType(History.class, new SyncProperties(null, null, new Object[]{"popStateEvent"}, null, 0));
      SyncManager.addSyncType(Screen.class, new SyncProperties(null, null, new Object[]{"width", "height"}, null, 0));
   }
public static void initSync ( ) { SyncManager . addSyncType ( Event . class , new SyncProperties ( null , null , new Object [ ] { "type" , "timeStamp" , "currentTag" } , null , 0 ) ) ; SyncManager . addSyncType ( MouseEvent . class , new SyncProperties ( null , null , new Object [ ] { "button" , "clientX" , "clientY" , "screenX" , "screenY" , "altKey" , "metaKey" , "ctrlKey" , "shiftKey" } , Event . class , 0 ) ) ; SyncManager . addSyncType ( KeyboardEvent . class , new SyncProperties ( null , null , new Object [ ] { "key" , "altKey" , "metaKey" , "ctrlKey" , "shiftKey" , "repeat" } , Event . class , 0 ) ) ; SyncManager . addSyncType ( FocusEvent . class , new SyncProperties ( null , null , new Object [ ] { "relatedTarget" } , Event . class , 0 ) ) ; SyncManager . addSyncType ( Element . class , new SyncProperties ( null , null , new Object [ ] { "startTagTxt" , "innerHTML" , "style" , "class" , "clickEvent" , "dblClickEvent" , "mouseDownEvent" , "mouseOutEvent" , "mouseMoveEvent" , "mouseUpEvent" , "mouseDownMoveUp" , "keyDownEvent" , "keyUpEvent" , "keyPressEvent" , "focusEvent" , "blurEvent" , "clientWidth" , "clientHeight" , "offsetLeft" , "offsetTop" , "offsetWidth" , "offsetHeight" , "scrollWidth" , "scrollHeight" } , 0 ) ) ; SyncManager . addSyncType ( Select . class , new SyncProperties ( null , null , new Object [ ] { "selectedIndex" , "changeEvent" } , Element . class , 0 ) ) ; SyncManager . addSyncType ( Input . class , new SyncProperties ( null , null , new Object [ ] { "value" , "checked" , "changeEvent" } , Element . class , 0 ) ) ; SyncManager . addSyncType ( Textarea . class , new SyncProperties ( null , null , new Object [ ] { "value" , "changeEvent" } , Element . class , 0 ) ) ; SyncManager . addSyncType ( Form . class , new SyncProperties ( null , null , new Object [ ] { "submitEvent" , "submitCount" , "submitInProgress" , "submitError" , "submitResult" } , Element . class , 0 ) ) ; SyncManager . addSyncType ( Window . class , new SyncProperties ( null , null , new Object [ ] { "innerWidth" , "innerHeight" , "devicePixelRatio" } , null , 0 ) ) ; SyncManager . addSyncType ( Document . class , new SyncProperties ( null , null , new Object [ ] { "mouseDownEvent" , "mouseMoveEvent" , "mouseUpEvent" , new SyncPropOptions ( "activeElement" , SyncPropOptions . SYNC_ON_DEMAND ) } , null , SyncPropOptions . SYNC_RECEIVE_ONLY ) ) ; SyncManager . addSyncType ( History . class , new SyncProperties ( null , null , new Object [ ] { "popStateEvent" } , null , 0 ) ) ; SyncManager . addSyncType ( Screen . class , new SyncProperties ( null , null , new Object [ ] { "width" , "height" } , null , 0 ) ) ; }
Can be called at startup by frameworks to allow synchronization of tag objects.
Can be called at startup by frameworks to allow synchronization of tag objects .
// By default, we'll synchronize any body content this tag has in a read-only way.  When it changes, there's a change event for innerHTML // and getInnerHTML() generates the new contents.  Same idea with startTagTxt for attribute changes. // Specific DOM type subclasses (e.g. input) have custom attributes that are sync'd for server tags we // We sync this value via the Select tag's selectedIndex. The option tag is not like repeat in that it's one instance rendered over and over with different // optionData values. TODO: should a child option tag create a class and the select tag manage the replication like repeat? //SyncManager.addSyncType(Option.class, new SyncProperties(null, null, new Object[]{"selected"}, Element.class, 0)); // This class inherits from Element but we are not inheriting the sync properties of Element right now... this api is not for content, just for global events