/** * {@inheritDoc} * @see ScriptableObject#has(java.lang.String, net.sourceforge.htmlunit.corejs.javascript.Scriptable) */ @Override public boolean has(final String name, final Scriptable start) { return properties_.containsKey(name) || super.has(name, start); }
/** * {@inheritDoc} * @see ScriptableObject#has(java.lang.String, net.sourceforge.htmlunit.corejs.javascript.Scriptable) */ @Override public boolean has(final String name, final Scriptable start) { return properties_.containsKey(name) || super.has(name, start); }
/** * {@inheritDoc} * @see ScriptableObject#has(java.lang.String, net.sourceforge.htmlunit.corejs.javascript.Scriptable) */ @Override public boolean has(final String name, final Scriptable start) { return properties_.containsKey(name) || super.has(name, start); }
/** * {@inheritDoc} * @see ScriptableObject#has(java.lang.String, net.sourceforge.htmlunit.corejs.javascript.Scriptable) */ @Override public boolean has(final String name, final Scriptable start) { return properties_.containsKey(name) || super.has(name, start); }
/** * {@inheritDoc} * @see ScriptableObject#has(java.lang.String, net.sourceforge.htmlunit.corejs.javascript.Scriptable) */ @Override public boolean has(final String name, final Scriptable start) { return properties_.containsKey(name) || super.has(name, start); }
@Override public boolean has(String name, Scriptable start) { if (this == thePrototypeInstance) return super.has(name, start); return (System.getProperty(name) != null); }
private static String getAttributeValue(final DomElement element, final String attribute) { // first try real attributes String value = element.getAttribute(attribute); if (DomElement.ATTRIBUTE_NOT_DEFINED == value && !(element instanceof HtmlApplet) && !(element instanceof HtmlObject)) { // second try are JavaScript attributes // ...but applets/objects are a bit special so ignore them final Object o = element.getScriptableObject(); if (o instanceof ScriptableObject) { final ScriptableObject scriptObject = (ScriptableObject) o; // we have to make sure the scriptObject has a slot for the given attribute. // just using get() may use e.g. getWithPreemption(). if (scriptObject.has(attribute, scriptObject)) { final Object jsValue = scriptObject.get(attribute, scriptObject); if (jsValue != Scriptable.NOT_FOUND && jsValue instanceof String) { value = (String) jsValue; } } } } return value; }
private static String getAttributeValue(final DomElement element, final String attribute) { // first try real attributes String value = element.getAttribute(attribute); if (DomElement.ATTRIBUTE_NOT_DEFINED == value && !(element instanceof HtmlApplet) && !(element instanceof HtmlObject)) { // second try are JavaScript attributes // ...but applets/objects are a bit special so ignore them final Object o = element.getScriptableObject(); if (o instanceof ScriptableObject) { final ScriptableObject scriptObject = (ScriptableObject) o; // we have to make sure the scriptObject has a slot for the given attribute. // just using get() may use e.g. getWithPreemption(). if (scriptObject.has(attribute, scriptObject)) { final Object jsValue = scriptObject.get(attribute, scriptObject); if (jsValue != Scriptable.NOT_FOUND && jsValue instanceof String) { value = (String) jsValue; } } } } return value; }
@Override public boolean has(String name, Scriptable start) { int info = findInstanceIdInfo(name); if (info != 0) { int attr = (info >>> 16); if ((attr & PERMANENT) != 0) { return true; } int id = (info & 0xFFFF); return NOT_FOUND != getInstanceIdValue(id); } if (prototypeValues != null) { int id = prototypeValues.findId(name); if (id != 0) { return prototypeValues.has(id); } } return super.has(name, start); }