[whatwg] iframe sandbox attribute
Boris Zbarsky
bzbarsky at MIT.EDU
Mon Jul 9 17:56:08 PDT 2012
On 7/9/12 8:39 PM, Ian Hickson wrote:
> Surely that's going to set the attribute regardless of whether the
> attribute is nullable or whatnot.
Well, that depends on how reflecting "DOMString?" attributes are
defined. Making setting null call removeAttribute would work much like
boolean attributes work.
> I mean, this always sets the attribute
> even if the attribute wasn't previously set:
>
> myElement.title = myElement.title
Yes, but myElement.checked = myElement.checked does not.
>> More importantly,
>>
>> myOtherFrame.sandbox = myFrame.sandbox;
>>
>> doesn't have weird surprising behavior if the attribute is something
>> whose value sanely distinguishes between the various possible sandbox
>> values.
>
> I'm not sure I follow.
The point is that 'not set' and 'empty string' don't mean the same thing
for @sandbox, and ideally the DOM reflection would preserve the distinction.
> I think remaining consistent with other non-boolean attributes, and thus
> having the setter always set the attribute, is fine.
And I think it's a footgun.....
-Boris
More information about the whatwg
mailing list