computedStyle of cloneNode

Hi list,

What should
getComputedStyle(foo.cloneNode(true)).opacity;
be?

Gecko returns the same value as getComputedStyle(foo).opacity, while WebKit
and Blink return empty strings. Edge returns "1" regardless of foo's
opacity.

It seems to me that returning the computed style of the cloned node is
wrong as the clone isn't in the document and therefore doesn't match the
same rules as the original. However, I can't find any specification text
that confirms this.

Thoughts?

Cheers,
    -Shane

Received on Tuesday, 3 May 2016 01:40:35 UTC