use dom_struct::dom_struct;
use js::context::{JSContext, NoGC};
use script_bindings::reflector::{Reflector, reflect_dom_object_with_cx};
use crate::dom::bindings::codegen::Bindings::PluginArrayBinding::PluginArrayMethods;
use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope;
use crate::dom::plugin::Plugin;
#[dom_struct]
pub(crate) struct PluginArray {
reflector_: Reflector,
}
impl PluginArray {
pub(crate) fn new_inherited() -> PluginArray {
PluginArray {
reflector_: Reflector::new(),
}
}
pub(crate) fn new(cx: &mut JSContext, global: &GlobalScope) -> DomRoot<PluginArray> {
reflect_dom_object_with_cx(Box::new(PluginArray::new_inherited()), global, cx)
}
}
impl PluginArrayMethods<crate::DomTypeHolder> for PluginArray {
fn Refresh(&self, _reload: bool) {}
fn Length(&self) -> u32 {
0
}
fn Item(&self, _index: u32) -> Option<DomRoot<Plugin>> {
None
}
fn NamedItem(&self, _name: DOMString) -> Option<DomRoot<Plugin>> {
None
}
fn IndexedGetter(&self, _index: u32) -> Option<DomRoot<Plugin>> {
None
}
fn NamedGetter(&self, _name: DOMString) -> Option<DomRoot<Plugin>> {
None
}
fn SupportedPropertyNames(&self, _: &NoGC) -> Vec<DOMString> {
vec![]
}
}