-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transferables #361
Transferables #361
Conversation
…ved during build process.
…ers the Mutation Phase
Woot! Ready for review now. |
authorURL: string; | ||
domURL: string; | ||
|
||
// ---- Optional Overrides |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure this is tracked: we'll need to update AMP's side once this is being upgraded.
*/ | ||
export function upgradeElement(baseElement: Element, workerDOMUrl: string, callbacks?: WorkerCallbacks, debug?: boolean): Promise<WorkerDom | null> { | ||
export function upgradeElement(baseElement: Element, domURL: string, longTask?: LongTaskFunction): Promise<Worker | null> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Why not just use the configuration struct here? There's always something comes up to add to this api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely should just use the struct since we're changing the signature anyway. Good idea.
if (sanitizer && !sanitizer.sanitize(node)) { | ||
return null; | ||
// If `node` is removed by the sanitizer, don't store it and return null. | ||
if (sanitizer && !sanitizer.sanitize(node)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should defer given the focus of this PR, but if we sanitization is meaningful here, we either should not create a node until it has been sanitized (looks like only by name in this case), or we should create the node via template and re-import into the doc post-sanitization.
Ready for review now.
This PR moves the transfer format over to
ArrayBuffer
s comprised ofUint16Array
members.Still needs another merge with
master
, will take a while since there have been so many changes.