INNER CODE UNIT · Python

op_get_property_list

feder-cr/invisible_playwright · src/invisible_playwright/_juggler/server.py:311

    def op_get_property_list(self, params: Dict) -> Any:
        """⛔ ONE HANDLE PER PROPERTY, and each one holds its value alive. On a
        large object this is the most expensive call in the file, which is why
        `json_value` exists and should be preferred when the values are
        serialisable."""
        names = self.injected.call(
            self.frame.frame_id,
            "(injected, o) => o === Object(o) ? Object.keys(o) : []",
            {"objectId": self.object_id}) or []
        out = []
        for name in names:
            object_id = self.injected.call(
                self.frame.frame_id, "(injected, o, n) => o[n]",
                {"objectId": self.object_id}, name, by_value=False)
            handle = ElementHandleDispatcher(self.server, self.frame, object_id)
            out.append({"name": name, "value": handle.channel})
        return {"properties": out}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…