Closed aleventhal-aisquared closed 8 years ago
This logic seems strange. What does the extension need from the core if it doesn't want run.js
to be run?
My understanding is the extension re-implements at least storage. Maybe we want a separate extension-core
or something?
This is for the case where the extension and the site both have Sitecues. The extension will load first and set this attribute. The page script needs to not run at this point. If it checks the attribute it can avoid running.
The extension will never run sitecues-core.
In that case, just set the sitecues.exists
flag.
The problem with that was that the page script can’t access it since it’s in the context of a contentscript from the extension. The extension can’t communicate to sitecues-core through window variable.
That's why we didn't use sitecues.exists for this before.
This should go in core.init
if it is to be implemented.
Also need to decide whether to exit quietly or loudly. I think at least a warning is appropriate, in case our state is buggy or we fail to prevent a side effect that the extension does not expect.
@aleventhal-aisquared offline you said something to the effect of "I realized a problem with this and need to rethink it" ... any new info?
Closing due to lack of activity. Happy to continue exploring the idea and review any relevant PRs.
If the extension is loaded it will set @data-sitecues-everywhere on the document element.
If this is present, we should not load run.js.