public class URL extends SimpleScriptable
URL.| Constructor and Description |
|---|
URL()
Creates an instance.
|
URL(String url,
Object base)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
createObjectURL(Object fileOrBlob)
The URL.createObjectURL() static method creates a DOMString containing a URL
representing the object given in parameter.
|
Object |
getDefaultValue(Class<?> hint)
Calls for instance for implicit conversion to string.
|
Object |
getOrigin() |
URLSearchParams |
getSearchParams() |
static void |
revokeObjectURL(Object objectURL) |
clone, equivalentValues, get, getBrowserVersion, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElementdefineFunctionProperties, defineProperty, getClassName, put, setClassName, setParentScopeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, sizepublic URL()
public URL(String url, Object base)
url - a string representing an absolute or relative URL.
If url is a relative URL, base is required, and will be used
as the base URL. If url is an absolute URL, a given base will be ignored.base - a string representing the base URL to use in case url
is a relative URL. If not specified, it defaults to ''.public static String createObjectURL(Object fileOrBlob)
fileOrBlob - Is a File object or a Blob object to create a object URL for.public static void revokeObjectURL(Object objectURL)
objectURL - String representing the object URL that was
created by calling URL.createObjectURL().public Object getOrigin()
public URLSearchParams getSearchParams()
public Object getDefaultValue(Class<?> hint)
getDefaultValue in interface net.sourceforge.htmlunit.corejs.javascript.ScriptablegetDefaultValue in class SimpleScriptablehint - the type hintSimpleScriptable.getDefaultValue(java.lang.Class)Copyright © 2002–2019 Gargoyle Software Inc.. All rights reserved.