diff --git a/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp b/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp index fc315ae0ff..6a48a46688 100644 --- a/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp +++ b/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp @@ -1311,7 +1311,7 @@ namespace CefSharp //Call GetObjects with the list of names provided (will default to all if the list is empty //Previously we only sent a response if there were bound objects, now we always send //a response so the promise is resolved. - auto objs = objectRepository->GetObjects(names); + auto objs = objectRepository->GetObjects(StringUtils::ToClr(frame->GetURL()), names); auto msg = CefProcessMessage::Create(kJavascriptRootObjectResponse); auto responseArgList = msg->GetArgumentList(); diff --git a/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp b/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp index eb0d261025..47daea5dd0 100644 --- a/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp +++ b/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp @@ -51,7 +51,7 @@ namespace CefSharp if (objectRepositorySettings->LegacyBindingEnabled) { - auto legacyBoundObjects = objectRepository->GetLegacyBoundObjects(); + auto legacyBoundObjects = objectRepository->GetLegacyBoundObjects(address); legacyBindingEnabled = objectRepository->HasBoundObjects; diff --git a/CefSharp.Core/DevTools/DevToolsClient.Generated.cs b/CefSharp.Core/DevTools/DevToolsClient.Generated.cs index c2ffb4c74c..06d1bef1c2 100644 --- a/CefSharp.Core/DevTools/DevToolsClient.Generated.cs +++ b/CefSharp.Core/DevTools/DevToolsClient.Generated.cs @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. // // **This code was generated by a tool, do not change directly** -// CHROMIUM VERSION 131.0.6778.86 +// CHROMIUM VERSION 132.0.6834.83 using System.Runtime.Serialization; namespace CefSharp.DevTools.Accessibility @@ -476,6 +476,11 @@ public System.Collections.Generic.IList public enum AXPropertyName { + /// + /// actions + /// + [EnumMember(Value = ("actions"))] + Actions, /// /// busy /// @@ -1454,7 +1459,17 @@ public enum CookieExclusionReason /// ExcludeThirdPartyPhaseout /// [EnumMember(Value = ("ExcludeThirdPartyPhaseout"))] - ExcludeThirdPartyPhaseout + ExcludeThirdPartyPhaseout, + /// + /// ExcludePortMismatch + /// + [EnumMember(Value = ("ExcludePortMismatch"))] + ExcludePortMismatch, + /// + /// ExcludeSchemeMismatch + /// + [EnumMember(Value = ("ExcludeSchemeMismatch"))] + ExcludeSchemeMismatch } /// @@ -6066,6 +6081,17 @@ internal string ruleTypes get; set; } + + /// + /// @starting-style CSS at-rule array. + /// The array enumerates @starting-style at-rules starting with the innermost one, going outwards. + /// + [DataMember(Name = ("startingStyles"), IsRequired = (false))] + public System.Collections.Generic.IList StartingStyles + { + get; + set; + } } /// @@ -6103,7 +6129,12 @@ public enum CSSRuleType /// StyleRule /// [EnumMember(Value = ("StyleRule"))] - StyleRule + StyleRule, + /// + /// StartingStyleRule + /// + [EnumMember(Value = ("StartingStyleRule"))] + StartingStyleRule } /// @@ -6723,6 +6754,16 @@ internal string logicalAxes get; set; } + + /// + /// true if the query contains scroll-state() queries. + /// + [DataMember(Name = ("queriesScrollState"), IsRequired = (false))] + public bool? QueriesScrollState + { + get; + set; + } } /// @@ -6849,6 +6890,34 @@ public string StyleSheetId } } + /// + /// CSS Starting Style at-rule descriptor. + /// + [System.Runtime.Serialization.DataContractAttribute] + public partial class CSSStartingStyle : CefSharp.DevTools.DevToolsDomainEntityBase + { + /// + /// The associated rule header range in the enclosing stylesheet (if + /// available). + /// + [DataMember(Name = ("range"), IsRequired = (false))] + public CefSharp.DevTools.CSS.SourceRange Range + { + get; + set; + } + + /// + /// Identifier of the stylesheet containing this object (if exists). + /// + [DataMember(Name = ("styleSheetId"), IsRequired = (false))] + public string StyleSheetId + { + get; + set; + } + } + /// /// CSS Layer data. /// @@ -7598,6 +7667,23 @@ public string StyleSheetId private set; } } + + /// + /// computedStyleUpdated + /// + [System.Runtime.Serialization.DataContractAttribute] + public class ComputedStyleUpdatedEventArgs : CefSharp.DevTools.DevToolsDomainEventArgsBase + { + /// + /// The node id that has updated computed styles. + /// + [DataMember(Name = ("nodeId"), IsRequired = (true))] + public int NodeId + { + get; + private set; + } + } } namespace CefSharp.DevTools.CacheStorage @@ -7976,6 +8062,11 @@ public enum PseudoType [EnumMember(Value = ("first-letter"))] FirstLetter, /// + /// check + /// + [EnumMember(Value = ("check"))] + Check, + /// /// before /// [EnumMember(Value = ("before"))] @@ -7986,6 +8077,11 @@ public enum PseudoType [EnumMember(Value = ("after"))] After, /// + /// select-arrow + /// + [EnumMember(Value = ("select-arrow"))] + SelectArrow, + /// /// marker /// [EnumMember(Value = ("marker"))] @@ -8136,16 +8232,6 @@ public enum PseudoType [EnumMember(Value = ("details-content"))] DetailsContent, /// - /// select-fallback-button - /// - [EnumMember(Value = ("select-fallback-button"))] - SelectFallbackButton, - /// - /// select-fallback-button-text - /// - [EnumMember(Value = ("select-fallback-button-text"))] - SelectFallbackButtonText, - /// /// picker /// [EnumMember(Value = ("picker"))] @@ -15507,6 +15593,7 @@ internal string type /// /// Initiator JavaScript stack trace, set for Script only. + /// Requires the Debugger domain to be enabled. /// [DataMember(Name = ("stack"), IsRequired = (false))] public CefSharp.DevTools.Runtime.StackTrace Stack @@ -16005,7 +16092,17 @@ public enum CookieBlockedReason /// NameValuePairExceedsMaxSize /// [EnumMember(Value = ("NameValuePairExceedsMaxSize"))] - NameValuePairExceedsMaxSize + NameValuePairExceedsMaxSize, + /// + /// PortMismatch + /// + [EnumMember(Value = ("PortMismatch"))] + PortMismatch, + /// + /// SchemeMismatch + /// + [EnumMember(Value = ("SchemeMismatch"))] + SchemeMismatch } /// @@ -21066,6 +21163,11 @@ public enum PermissionsPolicyFeature [EnumMember(Value = ("execution-while-not-rendered"))] ExecutionWhileNotRendered, /// + /// fenced-unpartitioned-storage-read + /// + [EnumMember(Value = ("fenced-unpartitioned-storage-read"))] + FencedUnpartitionedStorageRead, + /// /// focus-without-user-activation /// [EnumMember(Value = ("focus-without-user-activation"))] @@ -25157,7 +25259,8 @@ public string DefaultPrompt } /// - /// Fired for top level page lifecycle events such as navigation, load, paint, etc. + /// Fired for lifecycle events (navigation, load, paint, etc) in the current + /// target (including local frames). /// [System.Runtime.Serialization.DataContractAttribute] public class LifecycleEventEventArgs : CefSharp.DevTools.DevToolsDomainEventArgsBase @@ -28144,6 +28247,16 @@ public CefSharp.DevTools.Storage.AttributionScopesData ScopesData get; set; } + + /// + /// MaxEventLevelReports + /// + [DataMember(Name = ("maxEventLevelReports"), IsRequired = (true))] + public int MaxEventLevelReports + { + get; + set; + } } /// @@ -28727,6 +28840,11 @@ public enum AttributionReportingAggregatableResult [EnumMember(Value = ("insufficientBudget"))] InsufficientBudget, /// + /// insufficientNamedBudget + /// + [EnumMember(Value = ("insufficientNamedBudget"))] + InsufficientNamedBudget, + /// /// noMatchingSourceFilterData /// [EnumMember(Value = ("noMatchingSourceFilterData"))] @@ -31177,7 +31295,12 @@ public enum ContextState /// closed /// [EnumMember(Value = ("closed"))] - Closed + Closed, + /// + /// interrupted + /// + [EnumMember(Value = ("interrupted"))] + Interrupted } /// @@ -41554,6 +41677,22 @@ public event System.EventHandler StyleSheetRemoved } } + /// + /// ComputedStyleUpdated + /// + public event System.EventHandler ComputedStyleUpdated + { + add + { + _client.AddEventHandler("CSS.computedStyleUpdated", value); + } + + remove + { + _client.RemoveEventHandler("CSS.computedStyleUpdated", value); + } + } + partial void ValidateAddRule(string styleSheetId, string ruleText, CefSharp.DevTools.CSS.SourceRange location, int? nodeForPropertySyntaxValidation = null); /// /// Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the @@ -41775,6 +41914,29 @@ public System.Threading.Tasks.Task GetLocationFo return _client.ExecuteDevToolsMethodAsync("CSS.getLocationForSelector", dict); } + partial void ValidateTrackComputedStyleUpdatesForNode(int? nodeId = null); + /// + /// Starts tracking the given node for the computed style updates + /// and whenever the computed style is updated for node, it queues + /// a `computedStyleUpdated` event with throttling. + /// There can only be 1 node tracked for computed style updates + /// so passing a new node id removes tracking from the previous node. + /// Pass `undefined` to disable tracking. + /// + /// nodeId + /// returns System.Threading.Tasks.Task<DevToolsMethodResponse> + public System.Threading.Tasks.Task TrackComputedStyleUpdatesForNodeAsync(int? nodeId = null) + { + ValidateTrackComputedStyleUpdatesForNode(nodeId); + var dict = new System.Collections.Generic.Dictionary(); + if (nodeId.HasValue) + { + dict.Add("nodeId", nodeId.Value); + } + + return _client.ExecuteDevToolsMethodAsync("CSS.trackComputedStyleUpdatesForNode", dict); + } + partial void ValidateTrackComputedStyleUpdates(System.Collections.Generic.IList propertiesToTrack); /// /// Starts tracking the given computed styles for updates. The specified array of properties @@ -44543,21 +44705,23 @@ public System.Threading.Tasks.Task GetFrameOwnerAsync(str return _client.ExecuteDevToolsMethodAsync("DOM.getFrameOwner", dict); } - partial void ValidateGetContainerForNode(int nodeId, string containerName = null, CefSharp.DevTools.DOM.PhysicalAxes? physicalAxes = null, CefSharp.DevTools.DOM.LogicalAxes? logicalAxes = null); + partial void ValidateGetContainerForNode(int nodeId, string containerName = null, CefSharp.DevTools.DOM.PhysicalAxes? physicalAxes = null, CefSharp.DevTools.DOM.LogicalAxes? logicalAxes = null, bool? queriesScrollState = null); /// /// Returns the query container of the given node based on container query - /// conditions: containerName, physical, and logical axes. If no axes are - /// provided, the style container is returned, which is the direct parent or the - /// closest element with a matching container-name. + /// conditions: containerName, physical and logical axes, and whether it queries + /// scroll-state. If no axes are provided and queriesScrollState is false, the + /// style container is returned, which is the direct parent or the closest + /// element with a matching container-name. /// /// nodeId /// containerName /// physicalAxes /// logicalAxes + /// queriesScrollState /// returns System.Threading.Tasks.Task<GetContainerForNodeResponse> - public System.Threading.Tasks.Task GetContainerForNodeAsync(int nodeId, string containerName = null, CefSharp.DevTools.DOM.PhysicalAxes? physicalAxes = null, CefSharp.DevTools.DOM.LogicalAxes? logicalAxes = null) + public System.Threading.Tasks.Task GetContainerForNodeAsync(int nodeId, string containerName = null, CefSharp.DevTools.DOM.PhysicalAxes? physicalAxes = null, CefSharp.DevTools.DOM.LogicalAxes? logicalAxes = null, bool? queriesScrollState = null) { - ValidateGetContainerForNode(nodeId, containerName, physicalAxes, logicalAxes); + ValidateGetContainerForNode(nodeId, containerName, physicalAxes, logicalAxes, queriesScrollState); var dict = new System.Collections.Generic.Dictionary(); dict.Add("nodeId", nodeId); if (!(string.IsNullOrEmpty(containerName))) @@ -44575,6 +44739,11 @@ public System.Threading.Tasks.Task GetContainerForN dict.Add("logicalAxes", EnumToString(logicalAxes)); } + if (queriesScrollState.HasValue) + { + dict.Add("queriesScrollState", queriesScrollState.Value); + } + return _client.ExecuteDevToolsMethodAsync("DOM.getContainerForNode", dict); } @@ -51811,7 +51980,8 @@ public event System.EventHandler JavascriptDia } /// - /// Fired for top level page lifecycle events such as navigation, load, paint, etc. + /// Fired for lifecycle events (navigation, load, paint, etc) in the current + /// target (including local frames). /// public event System.EventHandler LifecycleEvent { diff --git a/CefSharp.Core/DevTools/DevToolsClient.Generated.netcore.cs b/CefSharp.Core/DevTools/DevToolsClient.Generated.netcore.cs index 3707ba3021..1e3783694c 100644 --- a/CefSharp.Core/DevTools/DevToolsClient.Generated.netcore.cs +++ b/CefSharp.Core/DevTools/DevToolsClient.Generated.netcore.cs @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. // // **This code was generated by a tool, do not change directly** -// CHROMIUM VERSION 131.0.6778.86 +// CHROMIUM VERSION 132.0.6834.83 using System.Text.Json.Serialization; namespace CefSharp.DevTools.Accessibility @@ -409,6 +409,11 @@ public System.Collections.Generic.IList public enum AXPropertyName { + /// + /// actions + /// + [JsonPropertyName("actions")] + Actions, /// /// busy /// @@ -1367,7 +1372,17 @@ public enum CookieExclusionReason /// ExcludeThirdPartyPhaseout /// [JsonPropertyName("ExcludeThirdPartyPhaseout")] - ExcludeThirdPartyPhaseout + ExcludeThirdPartyPhaseout, + /// + /// ExcludePortMismatch + /// + [JsonPropertyName("ExcludePortMismatch")] + ExcludePortMismatch, + /// + /// ExcludeSchemeMismatch + /// + [JsonPropertyName("ExcludeSchemeMismatch")] + ExcludeSchemeMismatch } /// @@ -5533,6 +5548,17 @@ public CefSharp.DevTools.CSS.CSSRuleType[] RuleTypes get; set; } + + /// + /// @starting-style CSS at-rule array. + /// The array enumerates @starting-style at-rules starting with the innermost one, going outwards. + /// + [JsonPropertyName("startingStyles")] + public System.Collections.Generic.IList StartingStyles + { + get; + set; + } } /// @@ -5570,7 +5596,12 @@ public enum CSSRuleType /// StyleRule /// [JsonPropertyName("StyleRule")] - StyleRule + StyleRule, + /// + /// StartingStyleRule + /// + [JsonPropertyName("StartingStyleRule")] + StartingStyleRule } /// @@ -6143,6 +6174,16 @@ public CefSharp.DevTools.DOM.LogicalAxes? LogicalAxes get; set; } + + /// + /// true if the query contains scroll-state() queries. + /// + [JsonPropertyName("queriesScrollState")] + public bool? QueriesScrollState + { + get; + set; + } } /// @@ -6269,6 +6310,33 @@ public string StyleSheetId } } + /// + /// CSS Starting Style at-rule descriptor. + /// + public partial class CSSStartingStyle : CefSharp.DevTools.DevToolsDomainEntityBase + { + /// + /// The associated rule header range in the enclosing stylesheet (if + /// available). + /// + [JsonPropertyName("range")] + public CefSharp.DevTools.CSS.SourceRange Range + { + get; + set; + } + + /// + /// Identifier of the stylesheet containing this object (if exists). + /// + [JsonPropertyName("styleSheetId")] + public string StyleSheetId + { + get; + set; + } + } + /// /// CSS Layer data. /// @@ -6959,6 +7027,23 @@ public string StyleSheetId private set; } } + + /// + /// computedStyleUpdated + /// + public class ComputedStyleUpdatedEventArgs : CefSharp.DevTools.DevToolsDomainEventArgsBase + { + /// + /// The node id that has updated computed styles. + /// + [JsonInclude] + [JsonPropertyName("nodeId")] + public int NodeId + { + get; + private set; + } + } } namespace CefSharp.DevTools.CacheStorage @@ -7332,6 +7417,11 @@ public enum PseudoType [JsonPropertyName("first-letter")] FirstLetter, /// + /// check + /// + [JsonPropertyName("check")] + Check, + /// /// before /// [JsonPropertyName("before")] @@ -7342,6 +7432,11 @@ public enum PseudoType [JsonPropertyName("after")] After, /// + /// select-arrow + /// + [JsonPropertyName("select-arrow")] + SelectArrow, + /// /// marker /// [JsonPropertyName("marker")] @@ -7492,16 +7587,6 @@ public enum PseudoType [JsonPropertyName("details-content")] DetailsContent, /// - /// select-fallback-button - /// - [JsonPropertyName("select-fallback-button")] - SelectFallbackButton, - /// - /// select-fallback-button-text - /// - [JsonPropertyName("select-fallback-button-text")] - SelectFallbackButtonText, - /// /// picker /// [JsonPropertyName("picker")] @@ -14450,6 +14535,7 @@ public CefSharp.DevTools.Network.InitiatorType Type /// /// Initiator JavaScript stack trace, set for Script only. + /// Requires the Debugger domain to be enabled. /// [JsonPropertyName("stack")] public CefSharp.DevTools.Runtime.StackTrace Stack @@ -14903,7 +14989,17 @@ public enum CookieBlockedReason /// NameValuePairExceedsMaxSize /// [JsonPropertyName("NameValuePairExceedsMaxSize")] - NameValuePairExceedsMaxSize + NameValuePairExceedsMaxSize, + /// + /// PortMismatch + /// + [JsonPropertyName("PortMismatch")] + PortMismatch, + /// + /// SchemeMismatch + /// + [JsonPropertyName("SchemeMismatch")] + SchemeMismatch } /// @@ -19552,6 +19648,11 @@ public enum PermissionsPolicyFeature [JsonPropertyName("execution-while-not-rendered")] ExecutionWhileNotRendered, /// + /// fenced-unpartitioned-storage-read + /// + [JsonPropertyName("fenced-unpartitioned-storage-read")] + FencedUnpartitionedStorageRead, + /// /// focus-without-user-activation /// [JsonPropertyName("focus-without-user-activation")] @@ -23380,7 +23481,8 @@ public string DefaultPrompt } /// - /// Fired for top level page lifecycle events such as navigation, load, paint, etc. + /// Fired for lifecycle events (navigation, load, paint, etc) in the current + /// target (including local frames). /// public class LifecycleEventEventArgs : CefSharp.DevTools.DevToolsDomainEventArgsBase { @@ -26218,6 +26320,16 @@ public CefSharp.DevTools.Storage.AttributionScopesData ScopesData get; set; } + + /// + /// MaxEventLevelReports + /// + [JsonPropertyName("maxEventLevelReports")] + public int MaxEventLevelReports + { + get; + set; + } } /// @@ -26797,6 +26909,11 @@ public enum AttributionReportingAggregatableResult [JsonPropertyName("insufficientBudget")] InsufficientBudget, /// + /// insufficientNamedBudget + /// + [JsonPropertyName("insufficientNamedBudget")] + InsufficientNamedBudget, + /// /// noMatchingSourceFilterData /// [JsonPropertyName("noMatchingSourceFilterData")] @@ -29058,7 +29175,12 @@ public enum ContextState /// closed /// [JsonPropertyName("closed")] - Closed + Closed, + /// + /// interrupted + /// + [JsonPropertyName("interrupted")] + Interrupted } /// @@ -38612,6 +38734,22 @@ public event System.EventHandler StyleSheetRemoved } } + /// + /// ComputedStyleUpdated + /// + public event System.EventHandler ComputedStyleUpdated + { + add + { + _client.AddEventHandler("CSS.computedStyleUpdated", value); + } + + remove + { + _client.RemoveEventHandler("CSS.computedStyleUpdated", value); + } + } + partial void ValidateAddRule(string styleSheetId, string ruleText, CefSharp.DevTools.CSS.SourceRange location, int? nodeForPropertySyntaxValidation = null); /// /// Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the @@ -38833,6 +38971,29 @@ public System.Threading.Tasks.Task GetLocationFo return _client.ExecuteDevToolsMethodAsync("CSS.getLocationForSelector", dict); } + partial void ValidateTrackComputedStyleUpdatesForNode(int? nodeId = null); + /// + /// Starts tracking the given node for the computed style updates + /// and whenever the computed style is updated for node, it queues + /// a `computedStyleUpdated` event with throttling. + /// There can only be 1 node tracked for computed style updates + /// so passing a new node id removes tracking from the previous node. + /// Pass `undefined` to disable tracking. + /// + /// nodeId + /// returns System.Threading.Tasks.Task<DevToolsMethodResponse> + public System.Threading.Tasks.Task TrackComputedStyleUpdatesForNodeAsync(int? nodeId = null) + { + ValidateTrackComputedStyleUpdatesForNode(nodeId); + var dict = new System.Collections.Generic.Dictionary(); + if (nodeId.HasValue) + { + dict.Add("nodeId", nodeId.Value); + } + + return _client.ExecuteDevToolsMethodAsync("CSS.trackComputedStyleUpdatesForNode", dict); + } + partial void ValidateTrackComputedStyleUpdates(System.Collections.Generic.IList propertiesToTrack); /// /// Starts tracking the given computed styles for updates. The specified array of properties @@ -41302,21 +41463,23 @@ public System.Threading.Tasks.Task GetFrameOwnerAsync(str return _client.ExecuteDevToolsMethodAsync("DOM.getFrameOwner", dict); } - partial void ValidateGetContainerForNode(int nodeId, string containerName = null, CefSharp.DevTools.DOM.PhysicalAxes? physicalAxes = null, CefSharp.DevTools.DOM.LogicalAxes? logicalAxes = null); + partial void ValidateGetContainerForNode(int nodeId, string containerName = null, CefSharp.DevTools.DOM.PhysicalAxes? physicalAxes = null, CefSharp.DevTools.DOM.LogicalAxes? logicalAxes = null, bool? queriesScrollState = null); /// /// Returns the query container of the given node based on container query - /// conditions: containerName, physical, and logical axes. If no axes are - /// provided, the style container is returned, which is the direct parent or the - /// closest element with a matching container-name. + /// conditions: containerName, physical and logical axes, and whether it queries + /// scroll-state. If no axes are provided and queriesScrollState is false, the + /// style container is returned, which is the direct parent or the closest + /// element with a matching container-name. /// /// nodeId /// containerName /// physicalAxes /// logicalAxes + /// queriesScrollState /// returns System.Threading.Tasks.Task<GetContainerForNodeResponse> - public System.Threading.Tasks.Task GetContainerForNodeAsync(int nodeId, string containerName = null, CefSharp.DevTools.DOM.PhysicalAxes? physicalAxes = null, CefSharp.DevTools.DOM.LogicalAxes? logicalAxes = null) + public System.Threading.Tasks.Task GetContainerForNodeAsync(int nodeId, string containerName = null, CefSharp.DevTools.DOM.PhysicalAxes? physicalAxes = null, CefSharp.DevTools.DOM.LogicalAxes? logicalAxes = null, bool? queriesScrollState = null) { - ValidateGetContainerForNode(nodeId, containerName, physicalAxes, logicalAxes); + ValidateGetContainerForNode(nodeId, containerName, physicalAxes, logicalAxes, queriesScrollState); var dict = new System.Collections.Generic.Dictionary(); dict.Add("nodeId", nodeId); if (!(string.IsNullOrEmpty(containerName))) @@ -41334,6 +41497,11 @@ public System.Threading.Tasks.Task GetContainerForN dict.Add("logicalAxes", EnumToString(logicalAxes)); } + if (queriesScrollState.HasValue) + { + dict.Add("queriesScrollState", queriesScrollState.Value); + } + return _client.ExecuteDevToolsMethodAsync("DOM.getContainerForNode", dict); } @@ -47910,7 +48078,8 @@ public event System.EventHandler JavascriptDia } /// - /// Fired for top level page lifecycle events such as navigation, load, paint, etc. + /// Fired for lifecycle events (navigation, load, paint, etc) in the current + /// target (including local frames). /// public event System.EventHandler LifecycleEvent { diff --git a/CefSharp.Test/JavascriptBinding/JavaScriptObjectRepositoryTests.cs b/CefSharp.Test/JavascriptBinding/JavaScriptObjectRepositoryTests.cs index c1679612f8..8481845968 100644 --- a/CefSharp.Test/JavascriptBinding/JavaScriptObjectRepositoryTests.cs +++ b/CefSharp.Test/JavascriptBinding/JavaScriptObjectRepositoryTests.cs @@ -41,7 +41,7 @@ public void ShouldRegisterJavascriptObjectBindWhenNamespaceIsNull() #endif Assert.True(javascriptObjectRepository.IsBound(name)); - var boundObjects = javascriptObjectRepository.GetObjects(new List { name }); + var boundObjects = javascriptObjectRepository.GetObjects("example.com", new List { name }); Assert.Single(boundObjects); var result = javascriptObjectRepository.TryCallMethod(boundObjects[0].Id, "getExampleString", new object[0]); @@ -74,7 +74,7 @@ public void ShouldRegisterJavascriptObjectPropertyBindWhenNamespaceIsNull() javascriptObjectRepository.Register(name, new NoNamespaceClass(), false, bindingOptions); Assert.True(javascriptObjectRepository.IsBound(name)); - var boundObjects = javascriptObjectRepository.GetObjects(new List { name }); + var boundObjects = javascriptObjectRepository.GetObjects("example.com", new List { name }); Assert.Single(boundObjects); object getResult, setResult = 100; diff --git a/CefSharp.Test/JavascriptBinding/JavascriptBindingTests.cs b/CefSharp.Test/JavascriptBinding/JavascriptBindingTests.cs index a0ceac4c65..3bfbdd13da 100644 --- a/CefSharp.Test/JavascriptBinding/JavascriptBindingTests.cs +++ b/CefSharp.Test/JavascriptBinding/JavascriptBindingTests.cs @@ -210,6 +210,7 @@ public async Task ShouldFireResolveObject() Assert.NotNull(evt); Assert.Equal("first", evt.Arguments.ObjectName); + Assert.Equal("https://cefsharp.example/HelloWorld.html", evt.Arguments.Url); } [Fact] diff --git a/CefSharp/Event/JavascriptBindingEventArgs.cs b/CefSharp/Event/JavascriptBindingEventArgs.cs index 955c735b8b..9275a1af2b 100644 --- a/CefSharp/Event/JavascriptBindingEventArgs.cs +++ b/CefSharp/Event/JavascriptBindingEventArgs.cs @@ -21,15 +21,22 @@ public class JavascriptBindingEventArgs : EventArgs /// public string ObjectName { get; private set; } + /// + /// URL of frame the call originated from. + /// + public string Url { get; private set; } + /// /// Constructor /// /// object repository + /// URL of frame the call originated from. /// object name - public JavascriptBindingEventArgs(IJavascriptObjectRepository objectRepository, string name) + public JavascriptBindingEventArgs(IJavascriptObjectRepository objectRepository, string url, string name) { ObjectRepository = objectRepository; ObjectName = name; + Url = url; } } } diff --git a/CefSharp/Internals/IJavascriptObjectRepositoryInternal.cs b/CefSharp/Internals/IJavascriptObjectRepositoryInternal.cs index 1069ebf52e..d2e4ae3e76 100644 --- a/CefSharp/Internals/IJavascriptObjectRepositoryInternal.cs +++ b/CefSharp/Internals/IJavascriptObjectRepositoryInternal.cs @@ -19,8 +19,8 @@ public interface IJavascriptObjectRepositoryInternal : IJavascriptObjectReposito bool TrySetProperty(long objectId, string name, object value, out string exception); #endif bool IsBrowserInitialized { get; set; } - List GetObjects(List names = null); - List GetLegacyBoundObjects(); + List GetObjects(string url, List names = null); + List GetLegacyBoundObjects(string url); void ObjectsBound(List> objs); } } diff --git a/CefSharp/Internals/JavascriptObjectRepository.cs b/CefSharp/Internals/JavascriptObjectRepository.cs index 8136b9e50e..af9fca0be7 100644 --- a/CefSharp/Internals/JavascriptObjectRepository.cs +++ b/CefSharp/Internals/JavascriptObjectRepository.cs @@ -123,16 +123,16 @@ public bool IsBound(string name) return objects.Values.Any(x => x.Name == name); } - List IJavascriptObjectRepositoryInternal.GetLegacyBoundObjects() + List IJavascriptObjectRepositoryInternal.GetLegacyBoundObjects(string url) { - RaiseResolveObjectEvent(LegacyObjects); + RaiseResolveObjectEvent(url, LegacyObjects); return objects.Values.Where(x => x.RootObject).ToList(); } //Ideally this would internal, unfurtunately it's used in C++ //and it's hard to expose internals - List IJavascriptObjectRepositoryInternal.GetObjects(List names) + List IJavascriptObjectRepositoryInternal.GetObjects(string url, List names) { //If there are no objects names or the count is 0 then we will raise //the resolve event then return all objects that are registered, @@ -140,7 +140,7 @@ List IJavascriptObjectRepositoryInternal.GetObjects(List x.RootObject).ToList(); } @@ -149,7 +149,7 @@ List IJavascriptObjectRepositoryInternal.GetObjects(ListCopyright © The CefSharp Authors - + - + diff --git a/appveyor.yml b/appveyor.yml index 30b19387d8..5dc660ad27 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 132.3.10-CI{build} +version: 132.3.10-RCI{build} clone_depth: 10