[API categories](API-categories.md) | [API index](API-index.md) # Frame (object) Remember to free all frame references for the browser to shut down cleanly. Otherwise data such as cookies or other storage might not be flushed to disk when closing app, and other issues might occur as well. If you store a reference to Frame somewhere in your code then to free it just assign a None value to the variable. To compare frame objects always use [GetIdentifier()](#getidentifier) method. Do not compare two Frame objects variables directly. There are some edge cases when after the OnBeforeClose event frame objects are no more globally referenced thus a new instance is created that wraps upstream CefFrame object. Frame objects that were globally unreferenced do not have properties of the original Frame object. Table of contents: * [Methods](#methods) * [Copy](#copy) * [Cut](#cut) * [Delete](#delete) * [ExecuteFunction](#executefunction) * [ExecuteJavascript](#executejavascript) * [GetBrowser](#getbrowser) * [GetParent](#getparent) * [GetIdentifier](#getidentifier) * [GetBrowserIdentifier](#getbrowseridentifier) * [GetName](#getname) * [GetParent](#getparent) * [GetProperty](#getproperty) * [GetSource](#getsource) * [GetText](#gettext) * [GetUrl](#geturl) * [IsFocused](#isfocused) * [IsMain](#ismain) * [IsValid](#isvalid) * [LoadString](#loadstring) * [LoadUrl](#loadurl) * [Paste](#paste) * [Redo](#redo) * [SelectAll](#selectall) * [SetProperty](#setproperty) * [Undo](#undo) * [ViewSource](#viewsource) ## Methods ### Copy | | | | --- | --- | | __Return__ | void | Execute copy in this frame. ### Cut | | | | --- | --- | | __Return__ | void | Execute cut in this frame. ### Delete | | | | --- | --- | | __Return__ | void | Execute delete in this frame. ### ExecuteFunction | Parameter | Type | | --- | --- | | funcName | string | | .. | *args | | __Return__ | void | Call a javascript function asynchronously. This can also call object's methods, just pass "object.method" as funcName. Any valid javascript syntax is allowed as funcName, you could even pass an anonymous function here. For a list of allowed types of arguments see [JavascriptBindings](JavascriptBindings.md).IsValueAllowed() - except function, method and instance. Passing a python function here is not allowed, it is only possible using the [JavascriptCallback](JavascriptCallback.md) object. ### ExecuteJavascript | Parameter | Type | | --- | --- | | jsCode | string | | scriptUrl="" | string | | startLine=1 | int | | __Return__ | void | Execute a string of JavaScript code in this frame. The sciptUrl parameter is the url where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error. The startLine parameter is the base line number to use for error reporting. This function executes asynchronously so there is no way to get the returned value. Calling javascript native code synchronously is not possible. ### GetBrowser | | | | --- | --- | | __Return__ | [Browser](Browser.md) | Returns the browser that this frame belongs to. ### GetParent | | | | --- | --- | | __Return__ | [Frame](Frame.md) | Returns the parent of this frame or None if this is the main (top-level) frame. ### GetIdentifier | | | | --- | --- | | __Return__ | int | Frame identifiers are unique per render process, they are not globally unique. Returns