/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ext/web/16_image_data.js
48 строк
1 KB
crowlbot
refactor(ext/web): port ImageData to Rust with CPPGC/objectwrap (#33777)
01 июн 2026, 15:51
Не верифицирован
01 июн 2026, 15:51
3b2cbfe
Код
Авторство
О чём код?
// Copyright 2018-2026 the Deno authors. MIT license. (function () { const { core, primordials } = __bootstrap; const { ImageData } = core.ops; const { ObjectDefineProperty, ObjectPrototypeIsPrototypeOf, SymbolFor, } = primordials; const webidl = core.loadExtScript("ext:deno_webidl/00_webidl.js"); const { createFilteredInspectProxy } = core.loadExtScript( "ext:deno_web/01_console.js", ); const ImageDataPrototype = ImageData.prototype; ObjectDefineProperty( ImageDataPrototype, SymbolFor("Deno.privateCustomInspect"), { __proto__: null, value: function customInspect(inspect, inspectOptions) { return inspect( createFilteredInspectProxy({ object: this, evaluate: ObjectPrototypeIsPrototypeOf(ImageDataPrototype, this), keys: [ "data", "width", "height", "pixelFormat", "colorSpace", ], }), inspectOptions, ); }, enumerable: false, writable: true, configurable: true, }, ); webidl.configureInterface(ImageData); return { ImageData, ImageDataPrototype }; })();