Exemple #1
0
        public void SpliceCollection(IJavascriptObject array, int index, int number, IJavascriptObject[] items)
        {
            var parameters = new IJavascriptObject[items.Length + 2];

            parameters[0] = _WebView.Factory.CreateInt(index);
            parameters[1] = _WebView.Factory.CreateInt(number);
            var idx = 2;

            items.ForEach(item => parameters[idx++] = item);

            array.InvokeNoResult("silentSplice", _WebView, parameters);
            _VueHelper.Value.InvokeNoResult("injectAll", _WebView, items);
        }
Exemple #2
0
 private void Add(IJavascriptObject array, int index, int number, IJavascriptObject value)
 {
     array.InvokeNoResult("silentSplice", _WebView, _WebView.Factory.CreateInt(index), _WebView.Factory.CreateInt(number), value);
     Inject(value);
 }
Exemple #3
0
 public void MoveCollectionItem(IJavascriptObject array, IJavascriptObject item, int oldIndex, int newIndex)
 {
     array.InvokeNoResult("silentSplice", _WebView, _WebView.Factory.CreateInt(oldIndex), _WebView.Factory.CreateInt(1));
     Add(array, newIndex, 0, item);
 }
Exemple #4
0
 public void SpliceCollection(IJavascriptObject array, int index, int number)
 {
     array.InvokeNoResult("silentSplice", _WebView, _WebView.Factory.CreateInt(index), _WebView.Factory.CreateInt(number));
 }
Exemple #5
0
        public void ClearAllCollection(IJavascriptObject array)
        {
            var length = array.GetArrayLength();

            array.InvokeNoResult("silentSplice", _WebView, _WebView.Factory.CreateInt(0), _WebView.Factory.CreateInt(length));
        }