Package org.cef.browser
Interface CefFrame
-
public interface CefFrameInterface representing a frame.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()Removes the native reference from an unused object.voidexecuteJavaScript(java.lang.String code, java.lang.String url, int line)Execute a string of JavaScript code in this frame.longgetIdentifier()Returns the globally unique identifier for this frame or < 0 if the underlying frame does not yet exist.java.lang.StringgetName()Returns the name for this frame.CefFramegetParent()Returns the parent of this frame or NULL if this is the main (top-level) frame.java.lang.StringgetURL()Emits the URL currently loaded in this frame.booleanisFocused()Returns true if this is the focused frame.booleanisMain()Returns true if this is the main (top-level) frame.booleanisValid()True if this object is currently attached to a valid frame.
-
-
-
Method Detail
-
dispose
void dispose()
Removes the native reference from an unused object.
-
getIdentifier
long getIdentifier()
Returns the globally unique identifier for this frame or < 0 if the underlying frame does not yet exist.- Returns:
- The frame identifier
-
getURL
java.lang.String getURL()
Emits the URL currently loaded in this frame.- Returns:
- the URL currently loaded in this frame.
-
getName
java.lang.String getName()
Returns the name for this frame. If the frame has an assigned name (for example, set via the iframe "name" attribute) then that value will be returned. Otherwise a unique name will be constructed based on the frame parent hierarchy. The main (top-level) frame will always have an empty name value.- Returns:
- The frame name
-
isMain
boolean isMain()
Returns true if this is the main (top-level) frame.- Returns:
- True if this frame is top-level otherwise false.
-
isValid
boolean isValid()
True if this object is currently attached to a valid frame.- Returns:
- True if valid otherwise false.
-
isFocused
boolean isFocused()
Returns true if this is the focused frame.- Returns:
- True if valid otherwise false.
-
getParent
CefFrame getParent()
Returns the parent of this frame or NULL if this is the main (top-level) frame.- Returns:
- The parent frame or NULL if this is the main frame
-
executeJavaScript
void executeJavaScript(java.lang.String code, java.lang.String url, int line)Execute a string of JavaScript code in this frame. The url 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 line parameter is the base line number to use for error reporting.- Parameters:
code- The code to be executed.url- The URL where the script in question can be found.line- The base line number to use for error reporting.
-
-