I am also interested in this.
Would like to distribute an extension to testers.
MacOS has no TestFlight equivalent.
Post
Replies
Boosts
Views
Activity
@timothy.hatcher
Hi, any update on this?
I've been checking safari builds as they come out, and the API has been missing in every case.
Do you know if there are any plans for this?
Any update on this?
What are our chances with getting these APIs ?
@timothy.hatcher
Thanks, the ticket is here: https://feedbackassistant.apple.com/feedback/8730949
@timothy.hatcher ?
Looks like this is fixed in beta 3
Thanks!
Any update on this ?
Cheers
I'm using this helper:
export function getFrameSpec(sender: MessageSender) {
	const tabId = getTab(sender)
	const frameId = notNullOrUndef(sender.frameId, 'sender.frameId')
	const spec = { tabId, frameId }
	return { ...spec, spec }
}
Which calls this TypeScript not null assertion routine:
export function notNullOrUndef<T>(
	t: T | null | undefined,
	name = '<unknown>'
): T | never {
	if (t == null) {
		throw new Error(`Expecting not null for ${name}`)
	} else {
		return t
	}
}
It's comparing against null using == double equals operator, which in JavaScript would mean the value is either undefined or null.
Normally, top level frames should have frameId set to 0
The fix is not in a beta seed yet. Try Safari Technology Preview 110, it should have the fix. Timothy, thanks but I tried that build, and it didn't seem to work either:
Still with:
Unhandled Promise Rejection: Error: Expecting not null for sender.frameId
Thanks!
I tried the latest safari 14 for catalina beta 1 and it's still missing frameId ?
Safari: Version 14.0 (15610.1.20.4, 15610)
> Unhandled Promise Rejection: Error: Expecting not null for sender.frameId
Timothy,
Great, thanks!
And to be clear, at least with the safari preview of a week ago, the MessageSender object was missing the frameId argument
Timothy,
Hi, thanks for your response!
MessageSender is the type of object passes as one of the arguments to the chrome.runtime.onMessage handler.
See:
developer.chrome.com/extensions/runtime#event-onMessage
developer.chrome.com/extensions/runtime#type-MessageSender
Add https:// for the above links. Unfortunately the editor won't let me create the links.