Open Bug 1499986 Opened 2 years ago Updated 1 year ago

Handling return value for a script

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

57 Branch
Unspecified
macOS
enhancement

Tracking

()

Webcompat Priority revisit

People

(Reporter: karlcow, Unassigned)

References

()

Details

(Whiteboard: [webcompat])

This is the minimal test created by Xidorn in https://webcompat.com/issues/14879

<!DOCTYPE html>
<meta charset="utf-8">
<script>
  function test() {
    a.style.background = "green";
    return a;
  }
</script>
<a href="javascript:test();">Click this</a>
<div id="a" style="width:100px;height:100px;"></div>

with this comment. 

> If we return a string in the function test, both Chrome and Firefox change the page to show the returned string. However, when the returned value is an object, Chrome silently drops the result, while Firefox serializes the result and shows it.
Component: DOM → DOM: Core & HTML

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

A test case here: https://miketaylr.com/bzla/return-type-navigation.html

Anne, what is the right thing to do here?

(Note: the reported issue appears to be fixed)

Webcompat Priority: ? → revisit
You need to log in before you can comment on or make changes to this bug.