mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Initial implementation of ownPropertyKeys proxy handler
Generates `SupportedPropertyNames` on DOM structs that should implement it. Most of them are unimplemented now (which can be implemented in later PRs), with the exception of `HTMLCollection`. Also added a couple relevant WPT tests. Closes #6390 Closes #2215
This commit is contained in:
parent
a5fbb2f2a6
commit
b11be4d253
13 changed files with 237 additions and 21 deletions
|
@ -11,7 +11,6 @@ use dom::bindings::utils::delete_property_by_id;
|
|||
use js::glue::GetProxyExtra;
|
||||
use js::glue::InvokeGetOwnPropertyDescriptor;
|
||||
use js::glue::{SetProxyExtra, GetProxyHandler};
|
||||
use js::jsapi::AutoIdVector;
|
||||
use js::jsapi::GetObjectProto;
|
||||
use js::jsapi::{Handle, HandleObject, HandleId, MutableHandle, RootedObject, ObjectOpResult};
|
||||
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject};
|
||||
|
@ -83,15 +82,6 @@ pub unsafe extern fn delete(cx: *mut JSContext, proxy: HandleObject, id: HandleI
|
|||
delete_property_by_id(cx, expando.handle(), id, bp)
|
||||
}
|
||||
|
||||
/// Stub for ownPropertyKeys
|
||||
pub unsafe extern fn own_property_keys(_cx: *mut JSContext,
|
||||
_proxy: HandleObject,
|
||||
_props: *mut AutoIdVector) -> u8 {
|
||||
// FIXME: implement this
|
||||
// https://github.com/servo/servo/issues/6390
|
||||
JSTrue
|
||||
}
|
||||
|
||||
/// Controls whether the Extensible bit can be changed
|
||||
pub unsafe extern fn prevent_extensions(_cx: *mut JSContext,
|
||||
_proxy: HandleObject,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue