зеркало из https://github.com/mozilla/gecko-dev.git
Bug 839913 - Fix HTMLAreaElement's stringifier. r=bz
This commit is contained in:
Родитель
94204a0497
Коммит
2e4faa8e90
|
@ -155,6 +155,11 @@ public:
|
|||
SetHTMLBoolAttr(nsGkAtoms::nohref, aValue, aError);
|
||||
}
|
||||
|
||||
void Stringify(nsAString& aResult)
|
||||
{
|
||||
GetHref(aResult);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope,
|
||||
bool* aTriedToWrap) MOZ_OVERRIDE;
|
||||
|
|
|
@ -270,6 +270,7 @@ MOCHITEST_FILES = \
|
|||
test_bug827126.html \
|
||||
test_bug827426.html \
|
||||
test_bug838582.html \
|
||||
test_bug839913.html \
|
||||
test_bug841466.html \
|
||||
test_iframe_sandbox_inheritance.html \
|
||||
file_iframe_sandbox_a_if1.html \
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test for HTMLAreaElement's stringifier</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var area = document.createElement("area");
|
||||
area.href = "http://example.org";
|
||||
assert_equals(area.href, "http://example.org");
|
||||
assert_equals(String(area), "http://example.org");
|
||||
}, "Area elements should stringify to the href attribute");
|
||||
</script>
|
|
@ -21,7 +21,12 @@ interface HTMLAreaElement : HTMLElement {
|
|||
[SetterThrows]
|
||||
attribute DOMString shape;
|
||||
[SetterThrows]
|
||||
stringifier attribute DOMString href;
|
||||
// No support for stringifier attributes yet
|
||||
//[SetterThrows]
|
||||
//stringifier attribute DOMString href;
|
||||
stringifier;
|
||||
[SetterThrows]
|
||||
attribute DOMString href;
|
||||
[SetterThrows]
|
||||
attribute DOMString target;
|
||||
[SetterThrows]
|
||||
|
|
Загрузка…
Ссылка в новой задаче