Пример #1
0
        /// <summary>
        /// Scrolls the specified rect of the given node into view if not already visible.
        /// Note: exactly one between nodeId, backendNodeId and objectId should be passed
        /// to identify the node.
        /// </summary>
        /// <param name = "nodeId">Identifier of the node.</param>
        /// <param name = "backendNodeId">Identifier of the backend node.</param>
        /// <param name = "objectId">JavaScript object id of the node wrapper.</param>
        /// <param name = "rect">The rect to be scrolled into view, relative to the node's border box, in CSS pixels.When omitted, center of the node will be used, similar to Element.scrollIntoView.</param>
        /// <returns>returns System.Threading.Tasks.Task&lt;DevToolsMethodResponse&gt;</returns>
        public async System.Threading.Tasks.Task <DevToolsMethodResponse> ScrollIntoViewIfNeededAsync(int?nodeId = null, int?backendNodeId = null, string objectId = null, CefSharp.DevTools.DOM.Rect rect = null)
        {
            ValidateScrollIntoViewIfNeeded(nodeId, backendNodeId, objectId, rect);
            var dict = new System.Collections.Generic.Dictionary <string, object>();

            if (nodeId.HasValue)
            {
                dict.Add("nodeId", nodeId.Value);
            }

            if (backendNodeId.HasValue)
            {
                dict.Add("backendNodeId", backendNodeId.Value);
            }

            if (!(string.IsNullOrEmpty(objectId)))
            {
                dict.Add("objectId", objectId);
            }

            if ((rect) != (null))
            {
                dict.Add("rect", rect.ToDictionary());
            }

            var methodResult = await _client.ExecuteDevToolsMethodAsync("DOM.scrollIntoViewIfNeeded", dict);

            return(methodResult);
        }
Пример #2
0
 partial void ValidateProfileSnapshot(string snapshotId, int?minRepeatCount = null, long?minDuration = null, CefSharp.DevTools.DOM.Rect clipRect = null);
Пример #3
0
 partial void ValidateScrollIntoViewIfNeeded(int?nodeId = null, int?backendNodeId = null, string objectId = null, CefSharp.DevTools.DOM.Rect rect = null);
Пример #4
0
        /// <summary>
        /// ProfileSnapshot
        /// </summary>
        /// <param name = "snapshotId">The id of the layer snapshot.</param>
        /// <param name = "minRepeatCount">The maximum number of times to replay the snapshot (1, if not specified).</param>
        /// <param name = "minDuration">The minimum duration (in seconds) to replay the snapshot.</param>
        /// <param name = "clipRect">The clip rectangle to apply when replaying the snapshot.</param>
        /// <returns>returns System.Threading.Tasks.Task&lt;ProfileSnapshotResponse&gt;</returns>
        public async System.Threading.Tasks.Task <ProfileSnapshotResponse> ProfileSnapshotAsync(string snapshotId, int?minRepeatCount = null, long?minDuration = null, CefSharp.DevTools.DOM.Rect clipRect = null)
        {
            ValidateProfileSnapshot(snapshotId, minRepeatCount, minDuration, clipRect);
            var dict = new System.Collections.Generic.Dictionary <string, object>();

            dict.Add("snapshotId", snapshotId);
            if (minRepeatCount.HasValue)
            {
                dict.Add("minRepeatCount", minRepeatCount.Value);
            }

            if (minDuration.HasValue)
            {
                dict.Add("minDuration", minDuration.Value);
            }

            if ((clipRect) != (null))
            {
                dict.Add("clipRect", clipRect.ToDictionary());
            }

            var methodResult = await _client.ExecuteDevToolsMethodAsync("LayerTree.profileSnapshot", dict);

            return(methodResult.DeserializeJson <ProfileSnapshotResponse>());
        }