You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTMLIFrameElement should use token list instead of manual string splitting for sandbox attribute #3758
A-content/domInteracting with the DOM from web contentE-less-complexStraightforward. Recommended for a new contributor.I-cleanupNo impact; the issue is one of maintainability or tidiness.
I'm looking into this, and it turned into a bit of a rabbit hole, and I wanted to get an idea of how deep to go, and if I'm even on the right path.
Right now, HTMLIframeElement.sandbox is implemented (against the spec) as a DOMString. W3C says sandbox is [PutForwards=value] readonly attribute DOMSettableTokenList sandbox;
My question would be, is it appropriate to try to get sandbox implemented as DOMSettableTokenList, which involves implementing that type all-together?
Or do we want to keep the type of sandbox of DOMString as far as the interface is concerned, and use a DOMTokenList internally? Seemingly the only benefit of that is allowing .tokens() to do the work. If that route would be chosen, it would probably be awkward if make_tokenlist_getter!'s method ended up returning a DOMString.
Is the goal ultimately to have sandbox be DOMSettableTokenList (gecko does this) or keep sandbox as a DOMString (Webkit/Blink do this)
The ultimate goal is to follow the spec, so we do want DOMSettableTokenList eventually (see #1717). If you feel like tackling that, that would be great and I'm happy to provide guidance. All I had in mind for this issue in particular was making use of tokens(); I think using a DOMTokenList internally and serializing that to a string would be acceptable, but it probably isn't worth creating a make_tokenlist_getter macro in that case.
Ok, cool. I think I'll start with just doing an internal DOMTokenList and serialization, I think I can handle that. After that, I'll try to figure out if DOMSettableTokenList is something I can take on.
A-content/domInteracting with the DOM from web contentE-less-complexStraightforward. Recommended for a new contributor.I-cleanupNo impact; the issue is one of maintainability or tidiness.
Activity
jimrhoskins commentedon Jan 5, 2015
I'm looking into this, and it turned into a bit of a rabbit hole, and I wanted to get an idea of how deep to go, and if I'm even on the right path.
Right now, HTMLIframeElement.sandbox is implemented (against the spec) as a DOMString. W3C says sandbox is
[PutForwards=value] readonly attribute DOMSettableTokenList sandbox;My question would be, is it appropriate to try to get sandbox implemented as DOMSettableTokenList, which involves implementing that type all-together?
Or do we want to keep the type of
sandboxofDOMStringas far as the interface is concerned, and use aDOMTokenListinternally? Seemingly the only benefit of that is allowing .tokens() to do the work. If that route would be chosen, it would probably be awkward ifmake_tokenlist_getter!'s method ended up returning a DOMString.Is the goal ultimately to have
sandboxbeDOMSettableTokenList(gecko does this) or keepsandboxas aDOMString(Webkit/Blink do this)jdm commentedon Jan 5, 2015
The ultimate goal is to follow the spec, so we do want DOMSettableTokenList eventually (see #1717). If you feel like tackling that, that would be great and I'm happy to provide guidance. All I had in mind for this issue in particular was making use of tokens(); I think using a DOMTokenList internally and serializing that to a string would be acceptable, but it probably isn't worth creating a make_tokenlist_getter macro in that case.
jimrhoskins commentedon Jan 5, 2015
Ok, cool. I think I'll start with just doing an internal DOMTokenList and serialization, I think I can handle that. After that, I'll try to figure out if DOMSettableTokenList is something I can take on.
Store HTMLIFrameElement sandbox attr as TokenList
Store HTMLIFrameElement sandbox attr as TokenList
auto merge of #4596 : jimrhoskins/servo/sandbox-tokenlist, r=jdm
Support for Separated Read Write